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

SquashSRS3: Fix bug

This commit is contained in:
winlin 2021-05-12 21:48:11 +08:00
parent 8c5a435714
commit 996c7d5697
5 changed files with 15 additions and 8 deletions

View file

@ -460,10 +460,14 @@ srs_error_t SrsStatistic::on_client(SrsContextId cid, SrsRequest* req, ISrsExpir
// got client.
client->conn = conn;
client->req = req;
client->type = type;
stream->nb_clients++;
vhost->nb_clients++;
// The req might be freed, in such as SrsLiveStream::update, so we must copy it.
// @see https://github.com/ossrs/srs/issues/2311
srs_freep(client->req);
client->req = req->copy();
return err;
}