修复调用close_streams后流注销需要三秒的问题

This commit is contained in:
648540858 2023-12-15 16:37:55 +08:00
parent 0f34bb2353
commit 2441951dc5
1 changed files with 4 additions and 5 deletions

View File

@ -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() {