From b766012bff3fde632df47996de34ef5cc204ba47 Mon Sep 17 00:00:00 2001 From: Rinat Ibragimov Date: Wed, 30 Nov 2016 01:41:01 +0300 Subject: [PATCH] remove timedout request ctx's from waiting_requests queue --- ngx_http_auth_ldap_module.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ngx_http_auth_ldap_module.c b/ngx_http_auth_ldap_module.c index 8144dcf..e6a1ab3 100644 --- a/ngx_http_auth_ldap_module.c +++ b/ngx_http_auth_ldap_module.c @@ -1800,6 +1800,12 @@ ngx_http_auth_ldap_authenticate(ngx_http_request_t *r, ngx_http_auth_ldap_ctx_t if (ctx->c != NULL) { ngx_http_auth_ldap_return_connection(ctx->c); } + + // Remove ctx from waiting_requests queue if it was added. + if (ngx_queue_next(&ctx->queue)) { + ngx_queue_remove(&ctx->queue); + } + return NGX_ERROR; }