From cd15c17499e8fb5139f874a4d6b16a775444797e Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Fri, 8 Jul 2022 17:46:35 -0700 Subject: [PATCH] ircd::db: Fix prefetcher inhibiting some clean shutdowns. --- ircd/db.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ircd/db.cc b/ircd/db.cc index 3db5c9bc3..14f881f67 100644 --- a/ircd/db.cc +++ b/ircd/db.cc @@ -890,7 +890,10 @@ ircd::db::prefetcher::wait_pending() dock.wait([this, &fetched_target]() noexcept { - return this->ticker->fetched >= fetched_target; + return false + || this->ticker->fetched >= fetched_target + || !request_workers + ; }); assert(fetched_target >= fetched_counter);