From 7c669527148b0d7e4cb93ffe77097c8add60bf76 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sun, 26 Aug 2007 15:38:51 +0000 Subject: [PATCH] check for shutdown (need to add to other backends?) --- servers/slapd/back-bdb/search.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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 ) -- 2.39.5