mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
STAT: Ignore stat for API, only for HTTP streaming clients.
This commit is contained in:
parent
28154e820c
commit
bc569d91a0
3 changed files with 12 additions and 11 deletions
|
@ -425,13 +425,12 @@ srs_error_t SrsStatistic::on_client(std::string id, SrsRequest* req, ISrsExpire*
|
|||
return err;
|
||||
}
|
||||
|
||||
void SrsStatistic::on_disconnect(std::string id)
|
||||
void SrsStatistic::on_disconnect(std::string id, bool* exists)
|
||||
{
|
||||
std::map<std::string, SrsStatisticClient*>::iterator it;
|
||||
if ((it = clients.find(id)) == clients.end()) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::map<std::string, SrsStatisticClient*>::iterator it = clients.find(id);
|
||||
if (exists) *exists = (it != clients.end());
|
||||
if (it == clients.end()) return;
|
||||
|
||||
SrsStatisticClient* client = it->second;
|
||||
SrsStatisticStream* stream = client->stream;
|
||||
SrsStatisticVhost* vhost = stream->vhost;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue