diff --git a/src/event/Loop.cxx b/src/event/Loop.cxx index 630b7fb8b..31049a057 100644 --- a/src/event/Loop.cxx +++ b/src/event/Loop.cxx @@ -175,6 +175,10 @@ EventLoop::HandleTimers() noexcept void EventLoop::AddDefer(DeferEvent &d) noexcept { +#ifdef HAVE_THREADED_EVENT_LOOP + assert(!IsAlive() || IsInside()); +#endif + defer.push_back(d); again = true; }