]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
Switch to LDAP_OTHER when handling a lost upstream.
authorOndřej Kuzník <okuznik@symas.com>
Thu, 2 Aug 2018 09:00:24 +0000 (10:00 +0100)
committerOndřej Kuzník <okuznik@symas.com>
Tue, 17 Nov 2020 17:58:15 +0000 (17:58 +0000)
LDAP_UNAVAILABLE signals "the server is shutting down or a subsystem
necessary to complete the operation is offline", so intelligent clients
tend to infer the connection will not be usable any more, which is not
the case here.

servers/lloadd/bind.c
servers/lloadd/operation.c

index 2354a9a70d4e0e6b262b1c963f178773a6ace921..3f0993a63e5bd3522f25a01e5b584b8d796993c8 100644 (file)
@@ -352,7 +352,7 @@ request_bind( LloadConnection *client, LloadOperation *op )
         Debug( LDAP_DEBUG_STATS, "request_bind: "
                 "connid=%lu, msgid=%d pinned upstream lost\n",
                 op->o_client_connid, op->o_client_msgid );
-        operation_send_reject( op, LDAP_UNAVAILABLE,
+        operation_send_reject( op, LDAP_OTHER,
                 "connection to the remote server has been severed", 1 );
         pin = 0;
         goto done;
@@ -638,7 +638,7 @@ handle_bind_response(
                 !BER_BVISNULL( &upstream->c_sasl_bind_mech ) ) {
             CONNECTION_UNLOCK(upstream);
             operation_send_reject(
-                    op, LDAP_UNAVAILABLE, "upstream connection is closing", 0 );
+                    op, LDAP_OTHER, "upstream connection is closing", 0 );
 
             ber_free( ber, 1 );
             return LDAP_SUCCESS;
index 95ae15e3d90a7aab933f0d06d1c361e2c4ddc1a4..f8f559cb40b72f012aba185a8ac4e1b959ece5c5 100644 (file)
@@ -805,7 +805,7 @@ operation_lost_upstream( LloadOperation *op )
 {
     LloadConnection *c = op->o_upstream;
 
-    operation_send_reject( op, LDAP_UNAVAILABLE,
+    operation_send_reject( op, LDAP_OTHER,
             "connection to the remote server has been severed", 0 );
 
     CONNECTION_LOCK(c);