mirror of
https://github.com/ossrs/srs.git
synced 2025-02-15 04:42:04 +00:00
parent
25fec76ea9
commit
4318d989a6
1 changed files with 5 additions and 1 deletions
|
@ -1335,6 +1335,10 @@ void SrsRtcServer::check_and_clean_timeout_session()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (session->is_stun_timeout()) {
|
if (session->is_stun_timeout()) {
|
||||||
|
// Now, we got the RTC session to cleanup, switch to its context
|
||||||
|
// to make all logs write to the "correct" pid+cid.
|
||||||
|
session->switch_to_context();
|
||||||
|
|
||||||
srs_trace("rtc session=%s, stun timeout", session->id().c_str());
|
srs_trace("rtc session=%s, stun timeout", session->id().c_str());
|
||||||
map_username_session.erase(iter++);
|
map_username_session.erase(iter++);
|
||||||
map_id_session.erase(session->get_peer_id());
|
map_id_session.erase(session->get_peer_id());
|
||||||
|
@ -1398,7 +1402,7 @@ srs_error_t SrsRtcTimerThread::cycle()
|
||||||
return srs_error_wrap(err, "rtc timer thread");
|
return srs_error_wrap(err, "rtc timer thread");
|
||||||
}
|
}
|
||||||
|
|
||||||
srs_usleep(1*1000*1000LL);
|
srs_usleep(1 * SRS_UTIME_SECONDS);
|
||||||
rtc_server->check_and_clean_timeout_session();
|
rtc_server->check_and_clean_timeout_session();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue