This is an automated email from the ASF dual-hosted git repository. aboda pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
The following commit(s) were added to refs/heads/master by this push: new 516e231 MINIFICPP-1245 - Sleep/hibernate breaks timer driven scheduler logic. 516e231 is described below commit 516e231f31ce857cfa18465d181e05afc92249c5 Author: Arpad Boda <ab...@apache.org> AuthorDate: Wed Jun 3 13:04:06 2020 +0200 MINIFICPP-1245 - Sleep/hibernate breaks timer driven scheduler logic. Signed-off-by: Arpad Boda <ab...@apache.org> Approved by szaszm on GH This closes #802 --- libminifi/include/utils/ThreadPool.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libminifi/include/utils/ThreadPool.h b/libminifi/include/utils/ThreadPool.h index 36cbbae..91592a4 100644 --- a/libminifi/include/utils/ThreadPool.h +++ b/libminifi/include/utils/ThreadPool.h @@ -99,7 +99,7 @@ class Worker { promise->set_value(result); return false; } - next_exec_time_ += run_determinant_->wait_time(); + next_exec_time_ = (std::max)(next_exec_time_ + run_determinant_->wait_time(), std::chrono::steady_clock::now()); return true; }