diff options
author | Max Kellermann <max@duempel.org> | 2014-01-09 20:55:43 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-09 20:56:00 +0100 |
commit | eb23ef1747d1a6bd4f9089c874c4acc5453cfac0 (patch) | |
tree | c597679f84f333da59ef77063e920d7d8e748f3f /src | |
parent | 970b10d01bbca4bd3c09d37c76531625b3adf0b4 (diff) | |
download | mpd-eb23ef1747d1a6bd4f9089c874c4acc5453cfac0.tar.gz mpd-eb23ef1747d1a6bd4f9089c874c4acc5453cfac0.tar.xz mpd-eb23ef1747d1a6bd4f9089c874c4acc5453cfac0.zip |
event/Loop: allow AddTimer() after Run() has returned
Kludge for libavahi-client quirk.
Diffstat (limited to '')
-rw-r--r-- | src/event/Loop.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/event/Loop.cxx b/src/event/Loop.cxx index 8cd4cde72..9c76c422c 100644 --- a/src/event/Loop.cxx +++ b/src/event/Loop.cxx @@ -100,7 +100,9 @@ EventLoop::RemoveIdle(IdleMonitor &i) void EventLoop::AddTimer(TimeoutMonitor &t, unsigned ms) { - assert(IsInsideOrVirgin()); + /* can't use IsInsideOrVirgin() here because libavahi-client + modifies the timeout during avahi_client_free() */ + assert(IsInsideOrNull()); timers.insert(TimerRecord(t, now_ms + ms)); again = true; |