mirror of
https://github.com/zotanmew/nginx-rtmp-module.git
synced 2024-05-02 04:03:44 +02:00
Hack for circular chain by @heftig
- fix infinite loop on session close
This commit is contained in:
parent
7db5ef0ea5
commit
e4799c633a
|
@ -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) {
|
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;
|
cl->next = cscf->free;
|
||||||
cscf->free = in;
|
cscf->free = in;
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue