]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
Adjust backend operation counting
authorOndřej Kuzník <ondra@mistotebe.net>
Mon, 26 Jun 2017 15:18:03 +0000 (16:18 +0100)
committerOndřej Kuzník <okuznik@symas.com>
Tue, 17 Nov 2020 17:55:46 +0000 (17:55 +0000)
servers/lloadd/operation.c

index 6bb0836af6affba5aac46185540b097895c11f26..f7fd24da9ffef241bd209e28bc8247d3df0f75fa 100644 (file)
@@ -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);