From 00a640d0d65c83d14d8461f0c88052f95f620eff Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Mon, 28 Jan 2013 14:02:46 +0400 Subject: [PATCH] implemented stat_stub decrement for nginx_stat to work properly --- ngx_rtmp_init.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ngx_rtmp_init.c b/ngx_rtmp_init.c index 7ab0c6d..46141de 100644 --- a/ngx_rtmp_init.c +++ b/ngx_rtmp_init.c @@ -239,6 +239,10 @@ ngx_rtmp_close_connection(ngx_connection_t *c) ngx_log_debug0(NGX_LOG_DEBUG_RTMP, c->log, 0, "close connection"); +#if (NGX_STAT_STUB) + (void) ngx_atomic_fetch_add(ngx_stat_active, -1); +#endif + pool = c->pool; ngx_close_connection(c); ngx_destroy_pool(pool);