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

Refine id and vid for statistic. 4.0.108

This commit is contained in:
winlin 2021-05-14 08:21:16 +08:00
parent 393d976685
commit 06f7d7d11b
8 changed files with 31 additions and 46 deletions

View file

@ -1555,7 +1555,7 @@ void SrsServer::resample_kbps()
// add delta of connection to server kbps.,
// for next sample() of server kbps can get the stat.
stat->kbps_add_delta(c->get_id(), conn);
stat->kbps_add_delta(c->get_id().c_str(), conn);
}
// TODO: FXME: support all other connections.
@ -1662,8 +1662,8 @@ void SrsServer::remove(ISrsResource* c)
ISrsStartableConneciton* conn = dynamic_cast<ISrsStartableConneciton*>(c);
SrsStatistic* stat = SrsStatistic::instance();
stat->kbps_add_delta(c->get_id(), conn);
stat->on_disconnect(c->get_id());
stat->kbps_add_delta(c->get_id().c_str(), conn);
stat->on_disconnect(c->get_id().c_str());
// use manager to free it async.
conn_manager->remove(c);