From cd2ffd175ba107c8f4a56b9633e52ff881eb1f7d Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 5 Mar 2020 14:33:31 +0100 Subject: [PATCH] CheckerComponent#Stop(): don't wait for checks refs #7888 --- lib/checker/checkercomponent.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/lib/checker/checkercomponent.cpp b/lib/checker/checkercomponent.cpp index 20300b3ab..0b5980acd 100644 --- a/lib/checker/checkercomponent.cpp +++ b/lib/checker/checkercomponent.cpp @@ -74,30 +74,6 @@ void CheckerComponent::Stop(bool runtimeRemoved) m_CV.notify_all(); } - double wait = 0.0; - - while (Checkable::GetPendingChecks() > 0) { - Log(LogDebug, "CheckerComponent") - << "Waiting for running checks (" << Checkable::GetPendingChecks() - << ") to finish. Waited for " << wait << " seconds now."; - - Utility::Sleep(0.1); - wait += 0.1; - - /* Pick a timeout slightly shorther than the process reload timeout. */ - double reloadTimeout = Application::GetReloadTimeout(); - double waitMax = reloadTimeout - 30; - if (waitMax <= 0) - waitMax = 1; - - if (wait > waitMax) { - Log(LogWarning, "CheckerComponent") - << "Checks running too long for " << wait - << " seconds, hard shutdown before reload timeout: " << reloadTimeout << "."; - break; - } - } - m_ResultTimer->Stop(); m_Thread.join();