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

refine the statistic arch.

This commit is contained in:
winlin 2015-01-05 12:40:38 +08:00
parent 40ed2249e8
commit cc796a433a
4 changed files with 90 additions and 105 deletions

View file

@ -396,7 +396,12 @@ int SrsRtmpConn::stream_service_cycle()
}
srs_assert(source != NULL);
SrsStatistic::instance()->add_request_info(source, req);
// update the statistic when source disconveried.
SrsStatistic* stat = SrsStatistic::instance();
if ((ret = stat->on_client(_srs_context->get_id(), req)) != ERROR_SUCCESS) {
srs_error("stat client failed. ret=%d", ret);
return ret;
}
// check ASAP, to fail it faster if invalid.
if (type != SrsRtmpConnPlay && !vhost_is_edge) {