mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-25 04:08:57 +08:00
Bugfix: Only close edge streams with no viewers (#2994)
Bugfix to only close streams with no viewers if they originate from an edge server rather than all streams. Fixes https://github.com/ZLMediaKit/ZLMediaKit/issues/2981
This commit is contained in:
parent
48ca0521cf
commit
88f7f46497
@ -577,8 +577,8 @@ void installWebHook() {
|
||||
});
|
||||
|
||||
NoticeCenter::Instance().addListener(&web_hook_tag, Broadcast::kBroadcastStreamNoneReader, [](BroadcastStreamNoneReaderArgs) {
|
||||
if (!origin_urls.empty()) {
|
||||
// 边沿站无人观看时立即停止溯源
|
||||
if (!origin_urls.empty() && sender.getOriginType() == MediaOriginType::pull) {
|
||||
// 边沿站无人观看时如果是拉流的则立即停止溯源
|
||||
sender.close(false);
|
||||
WarnL << "无人观看主动关闭流:" << sender.getOriginUrl();
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user