mirror of
https://github.com/mainnika/nginx-auth-ldap.git
synced 2026-05-22 15:53:39 +00:00
don't return the connection after every LDAP reply.
This makes the connection more sticky to one request and prevents auth timeouts and lost requests.
This commit is contained in:
@@ -1014,6 +1014,12 @@ ngx_http_auth_ldap_get_connection(ngx_http_auth_ldap_ctx_t *ctx)
|
||||
ngx_queue_t *q;
|
||||
ngx_http_auth_ldap_connection_t *c;
|
||||
|
||||
/*
|
||||
* If we already have a connection, just say we got them one.
|
||||
*/
|
||||
if (ctx->c != NULL)
|
||||
return 1;
|
||||
|
||||
server = ctx->server;
|
||||
|
||||
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, ctx->r->connection->log, 0, "http_auth_ldap: Wants a free connection to \"%V\"",
|
||||
@@ -1076,8 +1082,6 @@ ngx_http_auth_ldap_reply_connection(ngx_http_auth_ldap_connection_t *c, int erro
|
||||
ctx->error_msg.data = NULL;
|
||||
}
|
||||
|
||||
ngx_http_auth_ldap_return_connection(c);
|
||||
|
||||
ngx_http_auth_ldap_wake_request(ctx->r);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user