修复调用close_streams后流注销需要三秒的问题
This commit is contained in:
parent
0f34bb2353
commit
2441951dc5
|
|
@ -46,11 +46,7 @@ RtpSession::RtpSession(const Socket::Ptr &sock)
|
|||
}
|
||||
}
|
||||
|
||||
RtpSession::~RtpSession() {
|
||||
if (_process) {
|
||||
RtpSelector::Instance().delProcess(_stream_id, _process.get());
|
||||
}
|
||||
}
|
||||
RtpSession::~RtpSession() = default;
|
||||
|
||||
void RtpSession::onRecv(const Buffer::Ptr &data) {
|
||||
if (_is_udp) {
|
||||
|
|
@ -62,6 +58,9 @@ void RtpSession::onRecv(const Buffer::Ptr &data) {
|
|||
|
||||
void RtpSession::onError(const SockException &err) {
|
||||
WarnP(this) << _stream_id << " " << err;
|
||||
if (_process) {
|
||||
RtpSelector::Instance().delProcess(_stream_id, _process.get());
|
||||
}
|
||||
}
|
||||
|
||||
void RtpSession::onManager() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue