From 7fa80f77e9913faa24900cbf83548f56c3491657 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Wed, 28 Jul 2021 17:04:39 +0300 Subject: [PATCH] index: don't assume very fast machine cfg drive The scanner had a timeout for scanning, which doesn't work too well with machine with rel. fast disks / rel. slow machines. Which I don't happen to have! Let's remove the timeout, should help with getting unwanted timeouts which would cut short the indexing. --- lib/index/mu-indexer.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/index/mu-indexer.cc b/lib/index/mu-indexer.cc index fc227d2e..09766081 100644 --- a/lib/index/mu-indexer.cc +++ b/lib/index/mu-indexer.cc @@ -275,11 +275,10 @@ Indexer::Private::start(const Indexer::Config& conf) { // now there may still be messages in the work queue... - // finish those, but only for a while. - const auto start{std::chrono::steady_clock::now()}; - while (!fq_.empty() && std::chrono::steady_clock::now() - start < 10s) { + // finish those; this is a bit ugly; perhaps we should + // handle SIGTERM etc. + while (!fq_.empty()) std::this_thread::sleep_for(100ms); - } } if (!fq_.empty()) {