diff --git a/src/mail/ngx_mail_handler.c b/src/mail/ngx_mail_handler.c index 73bfbd233..9c83bdbc8 100644 --- a/src/mail/ngx_mail_handler.c +++ b/src/mail/ngx_mail_handler.c @@ -2100,6 +2100,10 @@ ngx_mail_close_connection(ngx_connection_t *c) #endif +#if (NGX_STAT_STUB) + ngx_atomic_fetch_add(ngx_stat_active, -1); +#endif + c->destroyed = 1; pool = c->pool;