mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
STAT: Refine stat for global server.
This commit is contained in:
parent
da24de5ecb
commit
4e3ea99ccd
6 changed files with 17 additions and 15 deletions
|
@ -41,6 +41,7 @@ using namespace std;
|
|||
#include <srs_protocol_amf0.hpp>
|
||||
#include <srs_app_utility.hpp>
|
||||
#include <srs_app_st.hpp>
|
||||
#include <srs_app_statistic.hpp>
|
||||
|
||||
ISrsHttpConnOwner::ISrsHttpConnOwner()
|
||||
{
|
||||
|
@ -411,6 +412,11 @@ srs_error_t SrsResponseOnlyHttpConn::on_message_done(ISrsHttpMessage* r, SrsHttp
|
|||
|
||||
srs_error_t SrsResponseOnlyHttpConn::on_conn_done(srs_error_t r0)
|
||||
{
|
||||
// Update statistic when done.
|
||||
SrsStatistic* stat = SrsStatistic::instance();
|
||||
stat->kbps_add_delta(get_id().c_str(), this);
|
||||
stat->on_disconnect(get_id().c_str());
|
||||
|
||||
// Because we use manager to manage this object,
|
||||
// not the http connection object, so we must remove it here.
|
||||
manager->remove(this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue