[Libreoffice-commits] online.git: loolwsd/IoUtil.cpp loolwsd/LOOLWSD.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Tue May 3 00:01:38 UTC 2016
loolwsd/IoUtil.cpp | 3 ++-
loolwsd/LOOLWSD.cpp | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 7d03ebdf85320150b520ac84506fe8318168f6a6
Author: Ashod Nakashian <ashod.nakashian at 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 <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at 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)
More information about the Libreoffice-commits
mailing list