mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-16 13:05:59 +08:00
优化代码
This commit is contained in:
@@ -76,6 +76,9 @@ void WebRtcSession::onError(const SockException &err) {
|
||||
//本WebRtcSession对象将在超时后自动销毁
|
||||
WarnP(this) << err.what();
|
||||
|
||||
if (!_transport) {
|
||||
return;
|
||||
}
|
||||
auto transport = std::move(_transport);
|
||||
this->Session::getPoller()->async([transport] {
|
||||
//延时减引用,防止使用transport对象时,销毁对象
|
||||
|
||||
Reference in New Issue
Block a user