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

SquashSRS4: Refine stat id. Fix SRT build bug

This commit is contained in:
winlin 2021-05-14 08:26:07 +08:00
parent 47f3f4da5c
commit f711eb79ed
9 changed files with 33 additions and 47 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);