优化on_publish hook响应太慢导致rtp推流无法秒开的问题

由限制缓存个数改成限制缓存时间长度(10秒)
This commit is contained in:
xiongziliang
2024-06-28 22:38:16 +08:00
parent 5470049076
commit 8390d72b78
2 changed files with 6 additions and 4 deletions

View File

@@ -117,6 +117,7 @@ private:
toolkit::Timer::Ptr _timer;
toolkit::Ticker _last_check_alive;
std::recursive_mutex _func_mtx;
toolkit::Ticker _cache_ticker;
std::deque<std::function<void()> > _cached_func;
};