]> git.sur5r.net Git - openldap/commitdiff
From rev 1.373, releasing the mutex means connection_close() may get called
authorHoward Chu <hyc@openldap.org>
Tue, 17 Oct 2006 19:31:42 +0000 (19:31 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 17 Oct 2006 19:31:42 +0000 (19:31 +0000)
from another thread. Drop the assert, just return instead.

servers/slapd/connection.c

index 5311091545826819ddcb87ca47500d5a93340344..ebdac9bcf4da906eb97becaa1997e9adca0dc180 100644 (file)
@@ -853,8 +853,11 @@ connection_close( Connection *c )
 
        assert( connections != NULL );
        assert( c != NULL );
+
+       if ( c->c_conn_state != SLAP_C_CLOSING )
+               return;
+
        assert( c->c_struct_state == SLAP_C_USED );
-       assert( c->c_conn_state == SLAP_C_CLOSING );
 
        /* NOTE: c_mutex should be locked by caller */