mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-17 05:25:57 +08:00
推流器主动断开时,避免开启断流续推功能
This commit is contained in:
@@ -219,10 +219,11 @@ void RtmpSession::onCmd_publish(AMFDecoder &dec) {
|
||||
}
|
||||
|
||||
void RtmpSession::onCmd_deleteStream(AMFDecoder &dec) {
|
||||
_push_src = nullptr;
|
||||
//此时回复可能触发broken pipe事件,从而直接触发onError回调;所以需要先把_push_src置空,防止触发断流续推功能
|
||||
sendStatus({ "level", "status",
|
||||
"code", "NetStream.Unpublish.Success",
|
||||
"description", "Stop publishing." });
|
||||
_push_src = nullptr;
|
||||
throw std::runtime_error(StrPrinter << "Stop publishing" << endl);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user