From: Howard Chu Date: Fri, 26 Mar 2021 13:46:56 +0000 (+0000) Subject: ITS#9498 replace asserts X-Git-Tag: OPENLDAP_REL_ENG_2_5_3BETA~3^2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6bf5795acbe2ab5b98c9068ee0b41406a016369;p=thirdparty%2Fopenldap.git ITS#9498 replace asserts Just no-op if trying to close a connection that's already being closed. --- diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index 5bd9fb831c..a2d2c568dc 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -763,7 +763,8 @@ void connection_closing( Connection *c, const char *why ) assert( connections != NULL ); assert( c != NULL ); - assert( c->c_conn_state != SLAP_C_INVALID ); + if( c->c_conn_state == SLAP_C_INVALID ) + return; /* c_mutex must be locked by caller */ @@ -796,7 +797,8 @@ connection_close( Connection *c ) assert( connections != NULL ); assert( c != NULL ); - assert( c->c_conn_state == SLAP_C_CLOSING ); + if ( c->c_conn_state != SLAP_C_CLOSING ) + return; /* NOTE: c_mutex should be locked by caller */