From f82ee25ec1e9f96edb5b3c69675d0cb63dbf6a57 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 8 Sep 2006 23:31:53 +0000 Subject: [PATCH] ITS#4667 in connection_closing, release c_mutex to allow waiters to clear out. --- servers/slapd/connection.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index f989d8ddaa..248b3b67f6 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -829,9 +829,15 @@ void connection_closing( Connection *c, const char *why ) connection_abandon( c ); /* wake write blocked operations */ - slapd_clr_write( sd, 1 ); if ( c->c_writewaiter ) { ldap_pvt_thread_cond_signal( &c->c_write_cv ); + ldap_pvt_thread_mutex_unlock( &c->c_mutex ); + slapd_clr_write( sd, 1 ); + ldap_pvt_thread_mutex_lock( &c->c_write_mutex ); + ldap_pvt_thread_mutex_lock( &c->c_mutex ); + ldap_pvt_thread_mutex_unlock( &c->c_write_mutex ); + } else { + slapd_clr_write( sd, 1 ); } } else if( why == NULL && c->c_close_reason == conn_lost_str ) { -- 2.39.5