mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-26 00:32:54 -05:00
Revert prev commit, better fix - make sure client conns are closed
as expected
This commit is contained in:
parent
a4167862c3
commit
9b8dd2033f
1 changed files with 8 additions and 5 deletions
|
|
@ -1185,8 +1185,6 @@ void connection_client_stop(
|
|||
/* get (locked) connection */
|
||||
c = connection_get( s );
|
||||
|
||||
if ( !c ) return;
|
||||
|
||||
assert( c->c_conn_state == SLAP_C_CLIENT );
|
||||
|
||||
c->c_listener = NULL;
|
||||
|
|
@ -1265,9 +1263,14 @@ connection_hangup( ber_socket_t s )
|
|||
|
||||
c = connection_get( s );
|
||||
if ( c ) {
|
||||
connection_closing( c, "connection lost" );
|
||||
connection_close( c );
|
||||
connection_return( c );
|
||||
if ( c->c_conn_state == SLAP_C_CLIENT ) {
|
||||
connection_return( c );
|
||||
connection_read_activate( s );
|
||||
} else {
|
||||
connection_closing( c, "connection lost" );
|
||||
connection_close( c );
|
||||
connection_return( c );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue