diff --git a/server/WebHook.cpp b/server/WebHook.cpp index 4dc02ca8..1157e728 100755 --- a/server/WebHook.cpp +++ b/server/WebHook.cpp @@ -417,12 +417,6 @@ void installWebHook(){ //监听播放失败(未找到特定的流)事件 NoticeCenter::Instance().addListener(nullptr, Broadcast::kBroadcastNotFoundStream, [](BroadcastNotFoundStreamArgs) { - if (start_with(args._param_strs, kEdgeServerParam)) { - //来自边沿站的溯源请求,流不存在时立即返回拉流失败 - closePlayer(); - return; - } - if (!origin_urls.empty()) { //设置了源站,那么尝试溯源 static atomic s_index { 0 }; @@ -431,6 +425,12 @@ void installWebHook(){ return; } + if (start_with(args._param_strs, kEdgeServerParam)) { + //源站收到来自边沿站的溯源请求,流不存在时立即返回拉流失败 + closePlayer(); + return; + } + GET_CONFIG(string, hook_stream_not_found, Hook::kOnStreamNotFound); if (!hook_enable || hook_stream_not_found.empty()) { return;