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

fix #713, refine source to avoid critical fetch and create. 2.0.222

This commit is contained in:
winlin 2016-12-13 17:57:49 +08:00
parent ec4d1b3b4f
commit cb1d47bfef
5 changed files with 19 additions and 32 deletions

View file

@ -1228,11 +1228,9 @@ int SrsHttpStreamServer::hijack(ISrsHttpMessage* request, ISrsHttpHandler** ph)
}
}
SrsSource* s = SrsSource::fetch(r);
if (!s) {
if ((ret = SrsSource::create(r, server, server, &s)) != ERROR_SUCCESS) {
return ret;
}
SrsSource* s = NULL;
if ((ret = SrsSource::fetch_or_create(r, server, server, &s)) != ERROR_SUCCESS) {
return ret;
}
srs_assert(s != NULL);