From: Vadim Zhestikov Date: Tue, 20 Oct 2026 22:31:16 +0000 (-0700) Subject: Mail: fixed worker_shutdown_timeout during Auth-Wait X-Git-Url: https://git.kaiwu.me/web/%7B@url%7D?a=commitdiff_plain;h=dcc3bb25a44ae7962c9e2d0410974d75b4ab7d87;p=nginx.git Mail: fixed worker_shutdown_timeout during Auth-Wait The worker_shutdown_timeout directive did not work for mail connections with an auth server that keeps returning Auth-Wait. The fix is to add c->close handling similar to ngx_mail_proxy_handler(). --- diff --git a/src/mail/ngx_mail_auth_http_module.c b/src/mail/ngx_mail_auth_http_module.c index 661310c18..e5c874fa9 100644 --- a/src/mail/ngx_mail_auth_http_module.c +++ b/src/mail/ngx_mail_auth_http_module.c @@ -873,6 +873,12 @@ ngx_mail_auth_sleep_handler(ngx_event_t *rev) c = rev->data; s = c->data; + if (c->close) { + ngx_log_error(NGX_LOG_INFO, c->log, 0, "shutdown timeout"); + ngx_mail_close_connection(c); + return; + } + if (rev->timedout) { rev->timedout = 0;