fix rtp server process removed server not clear

This commit is contained in:
xiongguangjie 2022-11-14 14:04:57 +08:00
parent 228fa17327
commit 87353534af

View File

@ -95,6 +95,9 @@ public:
if (!process && strong_self->_on_detach) { if (!process && strong_self->_on_detach) {
strong_self->_on_detach(); strong_self->_on_detach();
} }
if(process && strong_self->_on_detach){// tcp 链接防止断开不删除rtpServer
process->setOnDetach(std::move(strong_self->_on_detach));
}
if (!process) { // process 未创建触发rtp server 超时事件 if (!process) { // process 未创建触发rtp server 超时事件
NoticeCenter::Instance().emitEvent(Broadcast::KBroadcastRtpServerTimeout,strong_self->_local_port,strong_self->_stream_id,(int)strong_self->_tcp_mode,strong_self->_re_use_port,strong_self->_ssrc); NoticeCenter::Instance().emitEvent(Broadcast::KBroadcastRtpServerTimeout,strong_self->_local_port,strong_self->_stream_id,(int)strong_self->_tcp_mode,strong_self->_re_use_port,strong_self->_ssrc);
} }