修复推流代理失败无限重试的问题

解决媒体注销但还保持无限重试推流的bug
This commit is contained in:
xia-chu 2026-01-09 11:40:42 +08:00
parent 128d2a057c
commit c53730f36c

View File

@ -115,7 +115,13 @@ void PusherProxy::rePublish(const string &dst_url, int failed_cnt) {
return false;
}
WarnL << "推流重试[" << failed_cnt << "]:" << dst_url;
strong_self->MediaPusher::publish(dst_url);
try {
strong_self->MediaPusher::publish(dst_url);
} catch (std::exception &e) {
WarnL << e.what();
// 回调推流失败,一般是媒体注销了
strong_self->_on_close(SockException(Err_other, e.what()));
}
return false;
},
getPoller());