diff --git a/src/lib/data/indexer/interprocess/InterprocessIndexer.cpp b/src/lib/data/indexer/interprocess/InterprocessIndexer.cpp index a3c6f4bf..a0c68e60 100644 --- a/src/lib/data/indexer/interprocess/InterprocessIndexer.cpp +++ b/src/lib/data/indexer/interprocess/InterprocessIndexer.cpp @@ -18,7 +18,7 @@ InterprocessIndexer::InterprocessIndexer(const std::string& uuid, Id processId) void InterprocessIndexer::work() { - bool updaterThreadRunning = false; + bool updaterThreadRunning = true; std::shared_ptr updaterThread; std::shared_ptr indexer; @@ -29,10 +29,10 @@ void InterprocessIndexer::work() updaterThread = std::make_shared([&]() { - updaterThreadRunning = true; while (updaterThreadRunning) { std::this_thread::sleep_for(std::chrono::milliseconds(1000)); + if (m_interprocessIndexingStatusManager.getIndexingInterrupted()) { LOG_INFO("received indexer interrupt command.");