aboutsummaryrefslogtreecommitdiffstats
path: root/src/event
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-24 13:13:12 +0200
committerMax Kellermann <max@duempel.org>2014-08-24 13:13:12 +0200
commitd16fb797088e32cccecd6373fbe5eaefff423de2 (patch)
tree2d92d82636e38b6e92c75fdc11ee24f7ea2f0a95 /src/event
parentc38f29ce561a5c79a82c1c60c34ef88b5ded0660 (diff)
downloadmpd-d16fb797088e32cccecd6373fbe5eaefff423de2.tar.gz
mpd-d16fb797088e32cccecd6373fbe5eaefff423de2.tar.xz
mpd-d16fb797088e32cccecd6373fbe5eaefff423de2.zip
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.
Diffstat (limited to 'src/event')
-rw-r--r--src/event/TimeoutMonitor.cxx4
1 files changed, 3 insertions, 1 deletions
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