From: Pierangelo Masarati Date: Sun, 26 Aug 2007 15:38:51 +0000 (+0000) Subject: check for shutdown (need to add to other backends?) X-Git-Tag: OPENLDAP_REL_ENG_2_4_MP~72 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7c669527148b0d7e4cb93ffe77097c8add60bf76;p=openldap check for shutdown (need to add to other backends?) --- diff --git a/servers/slapd/back-bdb/search.c b/servers/slapd/back-bdb/search.c index e28c4b0993..5f0f583c69 100644 --- a/servers/slapd/back-bdb/search.c +++ b/servers/slapd/back-bdb/search.c @@ -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 )