Switch to LDAP_OTHER when handling a lost upstream.

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.
This commit is contained in:
Ondřej Kuzník 2018-08-02 10:00:24 +01:00
parent 81ead4a5f4
commit aab6af1c4e
2 changed files with 3 additions and 3 deletions

View 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;

View 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);