mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
Minor change to connection error handling
This commit is contained in:
parent
85fc1af755
commit
2c342e894c
@ -991,12 +991,19 @@ int connection_read(ber_socket_t s)
|
|||||||
/* connections_mutex and c_mutex are locked */
|
/* connections_mutex and c_mutex are locked */
|
||||||
connection_closing( c );
|
connection_closing( c );
|
||||||
connection_close( c );
|
connection_close( c );
|
||||||
|
connection_return( c );
|
||||||
|
ldap_pvt_thread_mutex_unlock( &connections_mutex );
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_NEEDS_READ, NULL ) )
|
if ( ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_NEEDS_READ, NULL ) ) {
|
||||||
slapd_set_read( s, 1 );
|
slapd_set_read( s, 1 );
|
||||||
if ( ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_NEEDS_WRITE, NULL ) )
|
}
|
||||||
|
|
||||||
|
if ( ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_NEEDS_WRITE, NULL ) ) {
|
||||||
slapd_set_write( s, 1 );
|
slapd_set_write( s, 1 );
|
||||||
|
}
|
||||||
|
|
||||||
connection_return( c );
|
connection_return( c );
|
||||||
ldap_pvt_thread_mutex_unlock( &connections_mutex );
|
ldap_pvt_thread_mutex_unlock( &connections_mutex );
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user