Hack for circular chain by @heftig

- fix infinite loop on session close
This commit is contained in:
Sergey Dryabzhinsky 2016-07-26 23:24:32 +03:00
parent 7db5ef0ea5
commit e4799c633a
1 changed files with 2 additions and 1 deletions

View File

@ -66,7 +66,8 @@ ngx_rtmp_free_shared_chain(ngx_rtmp_core_srv_conf_t *cscf, ngx_chain_t *in)
}
for (cl = in; ; cl = cl->next) {
if (cl->next == NULL) {
/* FIXME: Don't create circular chains in the first place */
if (cl->next == NULL || cl->next == in) {
cl->next = cscf->free;
cscf->free = in;
return;