diff options
author | Max Kellermann <max@musicpd.org> | 2018-01-29 23:06:43 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-01-29 23:06:43 +0100 |
commit | 3fd9a86f3c7f19a9b94a53f293e5c8b14e2d11a3 (patch) | |
tree | 5099199aa251b624d0dad7f6fde33cbfa3ebcb47 /src/event | |
parent | ce68701c0cc8b55ef500a409320fa13d126e1b3f (diff) |
event/Call: invoke function directly if the EventLoop is dead
Works around a deadlock bug which happens when waiting for an
EventLoop which isn't running anymore.
Diffstat (limited to 'src/event')
-rw-r--r-- | src/event/Call.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/event/Call.cxx b/src/event/Call.cxx index 938ce70bb..369fe0f7f 100644 --- a/src/event/Call.cxx +++ b/src/event/Call.cxx @@ -81,7 +81,7 @@ private: void BlockingCall(EventLoop &loop, std::function<void()> &&f) { - if (loop.IsInside()) { + if (loop.IsDead() || loop.IsInside()) { /* we're already inside the loop - we can simply call the function */ f(); |