diff options
Diffstat (limited to 'http/timer_queue.hpp')
-rw-r--r-- | http/timer_queue.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/http/timer_queue.hpp b/http/timer_queue.hpp index 5baf7beecb..24a4ab4c12 100644 --- a/http/timer_queue.hpp +++ b/http/timer_queue.hpp @@ -32,6 +32,11 @@ class TimerQueue { dq[index].second = nullptr; } + while (dq.begin() != dq.end() && dq.front().second == nullptr) + { + dq.pop_front(); + step++; + } } std::optional<size_t> add(std::function<void()> f) |