diff --git a/lib/remote/eventshandler.cpp b/lib/remote/eventshandler.cpp index 4bc028514..98e815354 100644 --- a/lib/remote/eventshandler.cpp +++ b/lib/remote/eventshandler.cpp @@ -101,6 +101,7 @@ bool EventsHandler::HandleRequest( } asio::const_buffer newLine ("\n", 1); + AsioConditionVariable dontLockOwnStrand (stream.get_io_service(), true); for (;;) { auto event (queue->WaitForEvent(&request, yc)); @@ -119,6 +120,8 @@ bool EventsHandler::HandleRequest( stream.async_flush(yc); } else if (server.Disconnected()) { return true; + } else { + dontLockOwnStrand.Wait(yc); } } }