Permalink
Browse files

implemented returning OK from close stream handler sending stream EOF…

…. Any other value can break destruction chain which leads to undestructed data
  • Loading branch information...
1 parent 62c750a commit d9579d627d727d8ad5edd2a0054f66324bebd459 @arut arut committed Jun 28, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 ngx_rtmp_cmd_module.c
View
@@ -369,7 +369,11 @@ ngx_rtmp_cmd_close_stream_init(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
static ngx_int_t
ngx_rtmp_cmd_close_stream(ngx_rtmp_session_t *s, ngx_rtmp_close_stream_t *v)
{
- return ngx_rtmp_send_user_stream_eof(s, NGX_RTMP_CMD_MSID);
+ ngx_rtmp_send_user_stream_eof(s, NGX_RTMP_CMD_MSID);
+
+ /* Whatever happens return OK
+ * since we should be careful with destruction */
+ return NGX_OK;
}

0 comments on commit d9579d6

Please sign in to comment.