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