mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-12-05 09:21:59 +08:00
修复rtp单端口模式主动关闭时线程安全问题
This commit is contained in:
parent
64285b6b09
commit
02a0b0402a
@ -127,8 +127,7 @@ void RtpSession::onRtpPacket(const char *data, size_t len) {
|
||||
weak_ptr<RtpSession> weak_self = static_pointer_cast<RtpSession>(shared_from_this());
|
||||
_process->setOnDetach([weak_self](const SockException &ex) {
|
||||
if (auto strong_self = weak_self.lock()) {
|
||||
strong_self->_process = nullptr;
|
||||
strong_self->shutdown(ex);
|
||||
strong_self->safeShutdown(ex);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user