event/Loop: allow AddTimer() after Run() has returned

Kludge for libavahi-client quirk.
This commit is contained in:
Max Kellermann 2014-01-09 20:55:43 +01:00
parent 970b10d01b
commit eb23ef1747

View File

@ -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;