From: Ondřej Kuzník Date: Mon, 26 Jun 2017 15:18:03 +0000 (+0100) Subject: Adjust backend operation counting X-Git-Tag: OPENLDAP_REL_ENG_2_5_1ALPHA~18^2~139 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95df8a1ec801dff67f4141caf311c8255e88b62f;p=thirdparty%2Fopenldap.git Adjust backend operation counting --- diff --git a/servers/lloadd/operation.c b/servers/lloadd/operation.c index 6bb0836af6..f7fd24da9f 100644 --- a/servers/lloadd/operation.c +++ b/servers/lloadd/operation.c @@ -755,10 +755,18 @@ request_process( Connection *client, Operation *op ) fail: if ( upstream ) { + Backend *b; + ldap_pvt_thread_mutex_unlock( &upstream->c_io_mutex ); CONNECTION_LOCK_DECREF(upstream); upstream->c_n_ops_executing--; + b = (Backend *)upstream->c_private; UPSTREAM_UNLOCK_OR_DESTROY(upstream); + + ldap_pvt_thread_mutex_lock( &b->b_mutex ); + b->b_n_ops_executing--; + ldap_pvt_thread_mutex_unlock( &b->b_mutex ); + operation_send_reject( op, LDAP_OTHER, "internal error", 0 ); } CONNECTION_LOCK_DECREF(client);