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:
parent
40ed2249e8
commit
cc796a433a
4 changed files with 90 additions and 105 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue