]> git.sur5r.net Git - openldap/commitdiff
ITS#3443 fix shutdown test
authorHoward Chu <hyc@openldap.org>
Thu, 16 Dec 2004 13:48:36 +0000 (13:48 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 16 Dec 2004 13:48:36 +0000 (13:48 +0000)
servers/slapd/syncrepl.c

index f8b7e55fc59fa8330c6b06cad5b5ac18f6c4a273..8e15a439347316ecfebef520f00cbeaa193d1bbc 100644 (file)
@@ -912,11 +912,13 @@ do_syncrepl(
                return NULL;
        }
 
-       if ( slapd_shutdown && si->si_ld ) {
-               ldap_get_option( si->si_ld, LDAP_OPT_DESC, &s );
-               connection_client_stop( s );
-               ldap_unbind( si->si_ld );
-               si->si_ld = NULL;
+       if ( slapd_shutdown ) {
+               if ( si->si_ld ) {
+                       ldap_get_option( si->si_ld, LDAP_OPT_DESC, &s );
+                       connection_client_stop( s );
+                       ldap_unbind( si->si_ld );
+                       si->si_ld = NULL;
+               }
                return NULL;
        }