|
|
|
@ -400,10 +400,12 @@ srs_error_t SrsHttpxConn::on_message_done(ISrsHttpMessage* r, SrsHttpResponseWri
|
|
|
|
|
|
|
|
|
|
srs_error_t SrsHttpxConn::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());
|
|
|
|
|
// Only stat the HTTP streaming clients, ignore all API clients.
|
|
|
|
|
bool exists = false;
|
|
|
|
|
SrsStatistic::instance()->on_disconnect(get_id().c_str(), &exists);
|
|
|
|
|
if (exists) {
|
|
|
|
|
SrsStatistic::instance()->kbps_add_delta(get_id().c_str(), this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Because we use manager to manage this object,
|
|
|
|
|
// not the http connection object, so we must remove it here.
|
|
|
|
|