From 28dc1538227bd40ca05d749a527c769af82a3fdb Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Mon, 2 Dec 2024 19:20:17 -0600 Subject: [PATCH] refactor --- repertory/librepertory/src/utils/polling.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repertory/librepertory/src/utils/polling.cpp b/repertory/librepertory/src/utils/polling.cpp index a7bb73d5..2f7681f2 100644 --- a/repertory/librepertory/src/utils/polling.cpp +++ b/repertory/librepertory/src/utils/polling.cpp @@ -54,11 +54,11 @@ void polling::frequency_thread( futures.pop_front(); } - lock.lock(); if (stop_requested_) { - continue; + return; } + lock.lock(); notify_.wait_for(lock, std::chrono::seconds(get_frequency_seconds())); } }