mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-25 20:27:34 +08:00
修复WebRtcTransport对象使用时释放导致崩溃的问题
This commit is contained in:
parent
2b5cad97cf
commit
0aec2ee1c0
@ -67,7 +67,9 @@ void WebRtcSession::onRecv_l(const Buffer::Ptr &buffer) {
|
|||||||
}
|
}
|
||||||
_ticker.resetTime();
|
_ticker.resetTime();
|
||||||
CHECK(_transport);
|
CHECK(_transport);
|
||||||
_transport->inputSockData(buffer->data(), buffer->size(), &_peer_addr);
|
//先增加引用技术,防止使用transport时,触发onError事件导致对象释放
|
||||||
|
auto transport = _transport;
|
||||||
|
transport->inputSockData(buffer->data(), buffer->size(), &_peer_addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebRtcSession::onError(const SockException &err) {
|
void WebRtcSession::onError(const SockException &err) {
|
||||||
|
Loading…
Reference in New Issue
Block a user