From: Howard Chu Date: Fri, 16 Jan 2009 21:49:00 +0000 (+0000) Subject: Revert prev commit, better fix - make sure client conns are closed X-Git-Tag: ACLCHECK_0~1005 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9b8dd2033ff5d20578d093cccdf14314abc3f762;p=openldap Revert prev commit, better fix - make sure client conns are closed as expected --- diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index c11c67e648..ae6416f5eb 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -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 ); + } } }