From: Howard Chu Date: Thu, 15 Jan 2009 21:31:58 +0000 (+0000) Subject: Fix prev commit - check for c_state == CLOSING first X-Git-Tag: ACLCHECK_0~1007 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=13ddc561d876c92931d52f9abc94be9db9e37c23;p=openldap Fix prev commit - check for c_state == CLOSING first --- diff --git a/servers/slapd/result.c b/servers/slapd/result.c index b5c6b90f5f..c9351fb477 100644 --- a/servers/slapd/result.c +++ b/servers/slapd/result.c @@ -144,6 +144,10 @@ static long send_ldap_ber( /* write only one pdu at a time - wait til it's our turn */ ldap_pvt_thread_mutex_lock( &conn->c_write1_mutex ); + if ( connection_state_closing( conn )) { + ldap_pvt_thread_mutex_unlock( &conn->c_write1_mutex ); + return 0; + } while ( conn->c_writers > 0 ) { ldap_pvt_thread_cond_wait( &conn->c_write1_cv, &conn->c_write1_mutex ); }