From 0f4a5f74453365236874d4223e1a177de0a2970d Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 28 Apr 2005 18:36:08 +0000 Subject: [PATCH] ITS#3671 must release conn->c_mutex to allow blocked writers to exit --- servers/slapd/connection.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index 2441e6a7c9..2f9ab79061 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -767,7 +767,12 @@ void connection_closing( Connection *c ) /* wake write blocked operations */ slapd_clr_write( sd, 1 ); - ldap_pvt_thread_cond_signal( &c->c_write_cv ); + if ( c->c_writewaiter ) { + ldap_pvt_thread_cond_signal( &c->c_write_cv ); + ldap_pvt_thread_mutex_unlock( &c->c_mutex ); + ldap_pvt_thread_yield(); + ldap_pvt_thread_mutex_lock( &c->c_mutex ); + } } } -- 2.39.5