aboutsummaryrefslogtreecommitdiffstats
path: root/src/event/Loop.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-04 17:05:01 +0100
committerMax Kellermann <max@duempel.org>2014-01-04 17:06:05 +0100
commit19424e95dba6ae2b25733a48994f3781624c9c2e (patch)
treef338d57708d640ec794361dc74c5e217979a8d13 /src/event/Loop.cxx
parent0f9ef2506f316d6bb7e8e455ad222bc173eb5b48 (diff)
downloadmpd-19424e95dba6ae2b25733a48994f3781624c9c2e.tar.gz
mpd-19424e95dba6ae2b25733a48994f3781624c9c2e.tar.xz
mpd-19424e95dba6ae2b25733a48994f3781624c9c2e.zip
event/Loop: remove bogus "!quit" assertion
Commit 1f11959 allowed modifying the "quit" attribute from any thread, and thus the assertion may fail spuriously. This assertion is too strict for the relaxed use of "quit". Let's remove it and move the "quit" check to before the SockedMonitor::Dispatch() call.
Diffstat (limited to '')
-rw-r--r--src/event/Loop.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/event/Loop.cxx b/src/event/Loop.cxx
index e2f021016..06e1499e7 100644
--- a/src/event/Loop.cxx
+++ b/src/event/Loop.cxx
@@ -165,17 +165,15 @@ EventLoop::Run()
now_ms = ::MonotonicClockMS();
- assert(!quit);
-
/* invoke sockets */
for (int i = 0; i < poll_result.GetSize(); ++i) {
auto events = poll_result.GetEvents(i);
if (events != 0) {
- auto m = (SocketMonitor *)poll_result.GetObject(i);
- m->Dispatch(events);
-
if (quit)
break;
+
+ auto m = (SocketMonitor *)poll_result.GetObject(i);
+ m->Dispatch(events);
}
}