1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-13 03:41:55 +00:00

statistic connection bytes before remove client.

This commit is contained in:
lovecat 2015-08-25 11:46:12 +08:00
parent 15102a7345
commit 9c2beffe8f
2 changed files with 2 additions and 3 deletions

View file

@ -210,8 +210,6 @@ int SrsRtmpConn::do_cycle()
ret = service_cycle();
http_hooks_on_close();
SrsStatistic* stat = SrsStatistic::instance();
stat->on_disconnect(_srs_context->get_id());
return ret;
}

View file

@ -896,6 +896,7 @@ void SrsServer::remove(SrsConnection* conn)
SrsStatistic* stat = SrsStatistic::instance();
stat->kbps_add_delta(conn);
stat->on_disconnect(conn->srs_id());
// all connections are created by server,
// so we free it here.