]> git.sur5r.net Git - openldap/commitdiff
More for prev commit
authorHoward Chu <hyc@openldap.org>
Sun, 25 Jan 2009 22:06:24 +0000 (22:06 +0000)
committerHoward Chu <hyc@openldap.org>
Sun, 25 Jan 2009 22:06:24 +0000 (22:06 +0000)
servers/slapd/result.c

index 65b3605d7ca9d6557970040bcc5a72c7dd19fb00..9dc2dd5362086c82ba8f33938c6784d1fd3ab0b0 100644 (file)
@@ -199,14 +199,12 @@ static long send_ldap_ber(
                    err, sock_errstr(err), 0 );
 
                if ( err != EWOULDBLOCK && err != EAGAIN ) {
+                       conn->c_writers--;
                        ldap_pvt_thread_mutex_unlock( &conn->c_write1_mutex );
                        connection_closing( conn, "connection lost on write" );
 
                        ldap_pvt_thread_mutex_unlock( &conn->c_mutex );
-                       ldap_pvt_thread_mutex_lock( &conn->c_write1_mutex );
-
-                       ret = -1;
-                       break;
+                       return -1;
                }
 
                /* wait for socket to be write-ready */