mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-19 13:23:44 -05:00
ITS#9799 Drop a bind connection if there's a timeout
This commit is contained in:
parent
646d0c1ba2
commit
34ebfac7ef
1 changed files with 4 additions and 3 deletions
|
|
@ -616,19 +616,20 @@ connection_timeout( LloadConnection *upstream, void *arg )
|
|||
LDAP_ADMINLIMIT_EXCEEDED,
|
||||
"upstream did not respond in time", 0 );
|
||||
|
||||
if ( rc == LDAP_SUCCESS ) {
|
||||
if ( upstream->c_type != LLOAD_C_BIND && rc == LDAP_SUCCESS ) {
|
||||
rc = operation_send_abandon( op, upstream );
|
||||
}
|
||||
operation_unlink( op );
|
||||
}
|
||||
|
||||
/* TODO: if operation_send_abandon failed, we need to kill the upstream */
|
||||
if ( rc == LDAP_SUCCESS ) {
|
||||
connection_write_cb( -1, 0, upstream );
|
||||
}
|
||||
|
||||
CONNECTION_LOCK(upstream);
|
||||
if ( upstream->c_state == LLOAD_C_CLOSING && !upstream->c_ops ) {
|
||||
/* ITS#9799: If a Bind timed out, connection is in an unknown state */
|
||||
if ( upstream->c_type == LLOAD_C_BIND || rc != LDAP_SUCCESS ||
|
||||
( upstream->c_state == LLOAD_C_CLOSING && !upstream->c_ops ) ) {
|
||||
CONNECTION_DESTROY(upstream);
|
||||
} else {
|
||||
CONNECTION_UNLOCK(upstream);
|
||||
|
|
|
|||
Loading…
Reference in a new issue