1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

RTC: Stat summary for connection

This commit is contained in:
winlin 2020-07-23 15:14:54 +08:00
parent be951b17f1
commit 77256eee08
4 changed files with 119 additions and 4 deletions

View file

@ -550,6 +550,10 @@ void SrsRtcServer::destroy(SrsRtcConnection* session)
map_id_session.erase(it);
}
SrsContextRestore(_srs_context->get_id());
session->switch_to_context();
srs_trace("RTC session=%s, destroy, summary: %s", session->id().c_str(), session->stat_->summary().c_str());
zombies_.push_back(session);
}
@ -581,7 +585,7 @@ void SrsRtcServer::check_and_clean_timeout_session()
// 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, summary: %s", session->id().c_str(), session->stat_->summary().c_str());
session->disposing_ = true;
zombies_.push_back(session);