loolwsd/IoUtil.cpp | 3 ++- loolwsd/LOOLWSD.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
New commits: commit 7d03ebdf85320150b520ac84506fe8318168f6a6 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Mon May 2 19:53:13 2016 -0400 loolwsd: corrections to terminate SocketProcessor Change-Id: I3b08d1b2f734b8736ed35f667c1ca988490c4fa4 Reviewed-on: https://gerrit.libreoffice.org/24600 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loolwsd/IoUtil.cpp b/loolwsd/IoUtil.cpp index 5df6dd0..c7abe51 100644 --- a/loolwsd/IoUtil.cpp +++ b/loolwsd/IoUtil.cpp @@ -67,7 +67,8 @@ void SocketProcessor(const std::shared_ptr<WebSocket>& ws, break; } - if (!ws->poll(waitTime, Poco::Net::Socket::SELECT_READ)) + if (!ws->poll(waitTime, Poco::Net::Socket::SELECT_READ) || + stopPredicate()) { // Wait some more. continue; diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp index 6f9aee5..3c0bdcb 100644 --- a/loolwsd/LOOLWSD.cpp +++ b/loolwsd/LOOLWSD.cpp @@ -597,7 +597,7 @@ private: return true; }, [&session]() { session->closeFrame(); }, - [&queueHandlerThread]() { return TerminationFlag && queueHandlerThread.isRunning(); }); + [&queueHandlerThread]() { return TerminationFlag || !queueHandlerThread.isRunning(); }); const bool canDestroy = docBroker->canDestroy(); if (canDestroy && !session->_bLoadError) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits