]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/connection.c
ITS#4088 force cursors to use same locker
[openldap] / servers / slapd / connection.c
index 6254517f8ce5e1f5c43198eef7af0fb23be8bf84..89de750871e83e2aba75a4f7e428cbdee03ee68a 100644 (file)
@@ -1545,6 +1545,9 @@ int connection_read(ber_socket_t s)
 #endif
 
                        connection_close( c );
+                       connection_return( c );
+                       ldap_pvt_thread_mutex_unlock( MCA_GET_CONN_MUTEX(s) );
+                       return 0;
 
                } else if ( rc == 0 ) {
                        void *ssl;
@@ -1578,7 +1581,7 @@ int connection_read(ber_socket_t s)
                        !ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_DATA_READY, NULL ) )
                {
 #ifdef SLAP_LIGHTWEIGHT_DISPATCHER
-                       if( rc == 0 ) slapd_set_read( s, 1 );
+                       slapd_set_read( s, 1 );
 #endif
 
                        connection_return( c );