From 13ddc561d876c92931d52f9abc94be9db9e37c23 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 15 Jan 2009 21:31:58 +0000 Subject: [PATCH] Fix prev commit - check for c_state == CLOSING first --- servers/slapd/result.c | 4 ++++ 1 file changed, 4 insertions(+) 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 ); } -- 2.39.5