From 6e0afdc41ae5fb20455097e68b0e72196f74f8cf Mon Sep 17 00:00:00 2001 From: Stuart W Baker Date: Thu, 28 Jan 2021 20:26:13 -0600 Subject: [PATCH] Flip the order of operations for resetting the callback flag and calling the actual callback. This allows for rearming the callback from the callback itself. (#510) --- src/utils/LimitTimer.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/LimitTimer.hxx b/src/utils/LimitTimer.hxx index 57c9ab61f..a42ba6f1e 100644 --- a/src/utils/LimitTimer.hxx +++ b/src/utils/LimitTimer.hxx @@ -109,8 +109,8 @@ private: ++bucket_; if (needUpdate_) { - callback_(); needUpdate_ = false; + callback_(); } if (bucket_ >= bucketMax_) {