Skip to content

Commit ae6ef22

Browse files
committed
[fix] fixed a bug may lead to infinite loop and some typos.
1 parent 4b75983 commit ae6ef22

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

ngx_http_flv_live_module.c

+1-12
Original file line numberDiff line numberDiff line change
@@ -1199,7 +1199,6 @@ ngx_http_flv_live_close_stream(ngx_rtmp_session_t *s,
11991199
ngx_rtmp_live_ctx_t *ctx, **cctx, *unlink;
12001200
ngx_http_request_t *r;
12011201
ngx_rtmp_live_app_conf_t *lacf;
1202-
ngx_rtmp_live_stream_t **stream;
12031202
ngx_flag_t passive;
12041203

12051204
lacf = ngx_rtmp_get_module_app_conf(s, ngx_rtmp_live_module);
@@ -1270,16 +1269,6 @@ ngx_http_flv_live_close_stream(ngx_rtmp_session_t *s,
12701269

12711270
*cctx = ctx->next;
12721271

1273-
if (ctx->stream->pub_ctx == NULL) {
1274-
stream = ngx_rtmp_live_get_stream(s, ctx->stream->name, 0);
1275-
if (stream) {
1276-
*stream = (*stream)->next;
1277-
1278-
ctx->stream->next = lacf->free_streams;
1279-
lacf->free_streams = ctx->stream;
1280-
}
1281-
}
1282-
12831272
ctx->next = NULL;
12841273
ctx->stream = NULL;
12851274

@@ -1295,7 +1284,7 @@ ngx_http_flv_live_close_stream(ngx_rtmp_session_t *s,
12951284

12961285
/**
12971286
* close only http requests here, the other
1298-
* requests were left for next_clost_stream
1287+
* requests were left for next_close_stream
12991288
**/
13001289

13011290
next:

ngx_rtmp_live_module.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ ngx_rtmp_live_merge_app_conf(ngx_conf_t *cf, void *parent, void *child)
292292

293293
cln = ngx_pool_cleanup_add(cf->pool, 0);
294294
if (cln == NULL) {
295-
return NULL;
295+
return NGX_CONF_ERROR;
296296
}
297297

298298
cln->handler = ngx_rtmp_live_free_pool_cleanup;

0 commit comments

Comments
 (0)