mirror of
https://github.com/ossrs/srs.git
synced 2025-02-15 04:42:04 +00:00
For #803, should refine code.
This commit is contained in:
parent
a6eebacc99
commit
6da6e0511d
1 changed files with 16 additions and 12 deletions
|
@ -359,18 +359,22 @@ void SrsStatistic::on_stream_close(SrsRequest* req)
|
||||||
SrsStatisticVhost* vhost = create_vhost(req);
|
SrsStatisticVhost* vhost = create_vhost(req);
|
||||||
SrsStatisticStream* stream = create_stream(vhost, req);
|
SrsStatisticStream* stream = create_stream(vhost, req);
|
||||||
stream->close();
|
stream->close();
|
||||||
|
|
||||||
//TODO Is this correct? Something is not released?
|
// TODO: FIXME: Should fix https://github.com/ossrs/srs/issues/803
|
||||||
std::map<int64_t, SrsStatisticStream*>::iterator it;
|
if (true) {
|
||||||
if ((it=streams.find(stream->id)) != streams.end()) {
|
std::map<int64_t, SrsStatisticStream*>::iterator it;
|
||||||
streams.erase(it);
|
if ((it=streams.find(stream->id)) != streams.end()) {
|
||||||
}
|
streams.erase(it);
|
||||||
|
}
|
||||||
std::map<std::string, SrsStatisticStream*>::iterator sit;
|
}
|
||||||
if ((sit=rstreams.find(stream->url)) != rstreams.end()) {
|
|
||||||
rstreams.erase(sit);
|
// TODO: FIXME: Should fix https://github.com/ossrs/srs/issues/803
|
||||||
}
|
if (true) {
|
||||||
|
std::map<std::string, SrsStatisticStream*>::iterator it;
|
||||||
|
if ((it=rstreams.find(stream->url)) != rstreams.end()) {
|
||||||
|
rstreams.erase(it);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int SrsStatistic::on_client(int id, SrsRequest* req, SrsConnection* conn, SrsRtmpConnType type)
|
int SrsStatistic::on_client(int id, SrsRequest* req, SrsConnection* conn, SrsRtmpConnType type)
|
||||||
|
|
Loading…
Reference in a new issue