From d16fb797088e32cccecd6373fbe5eaefff423de2 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 24 Aug 2014 13:13:12 +0200 Subject: event/TimeoutMonitor: reset "active" flag before invoking OnTimeout() The IsActive() method returned true even if the timer was not active, after it completed once. This broke the state file timer, and the state file was not saved periodically. --- src/event/TimeoutMonitor.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/event/TimeoutMonitor.cxx b/src/event/TimeoutMonitor.cxx index cffad6b92..b1e7174eb 100644 --- a/src/event/TimeoutMonitor.cxx +++ b/src/event/TimeoutMonitor.cxx @@ -64,7 +64,9 @@ TimeoutMonitor::ScheduleSeconds(unsigned s) void TimeoutMonitor::Run() { -#ifndef USE_EPOLL +#ifdef USE_EPOLL + active = true; +#else Cancel(); #endif -- cgit v1.2.3