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())); } }