From a0dec8cd793dc0777e44ffb8b0eb332678044285 Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Wed, 12 Jan 2022 20:24:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=A4=9A=E7=BA=A7=E6=BA=AF?= =?UTF-8?q?=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/WebHook.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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;