Commit dfa9001e by ziyue

优化代码

parent 3d64f725
......@@ -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对象时,销毁对象
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论