]> git.sur5r.net Git - openldap/commitdiff
check for shutdown (need to add to other backends?)
authorPierangelo Masarati <ando@openldap.org>
Sun, 26 Aug 2007 15:38:51 +0000 (15:38 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sun, 26 Aug 2007 15:38:51 +0000 (15:38 +0000)
servers/slapd/back-bdb/search.c

index e28c4b0993f00cc3b8fd5b19a875ebc8fd6b8d67..5f0f583c693a6268d054c150001ee4993786b84d 100644 (file)
@@ -660,6 +660,15 @@ loop_begin:
                        goto done;
                }
 
+               /* mostly needed by internal searches,
+                * e.g. related to syncrepl, for whom
+                * abandon does not get set... */
+               if ( slapd_shutdown ) {
+                       rs->sr_err = LDAP_UNAVAILABLE;
+                       send_ldap_disconnect( op, rs );
+                       goto done;
+               }
+
                /* check time limit */
                if ( op->ors_tlimit != SLAP_NO_LIMIT
                                && slap_get_time() > stoptime )