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

STAT: Refine stat for global server.

This commit is contained in:
winlin 2022-08-27 18:50:13 +08:00
parent da24de5ecb
commit 4e3ea99ccd
6 changed files with 17 additions and 15 deletions

View file

@ -1458,6 +1458,11 @@ srs_error_t SrsRtmpConn::cycle()
{
srs_error_t err = do_cycle();
// Update statistic when done.
SrsStatistic* stat = SrsStatistic::instance();
stat->kbps_add_delta(get_id().c_str(), this);
stat->on_disconnect(get_id().c_str());
// Notify manager to remove it.
// Note that we create this object, so we use manager to remove it.
manager->remove(this);