[Libreoffice-commits] online.git: wsd/DocumentBroker.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Mon Mar 27 03:21:22 UTC 2017
wsd/DocumentBroker.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit fddb86744e72ef6d2a0427126d56c154217d4df3
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Sun Mar 26 23:09:59 2017 -0400
wsd: stop DocBroker poll thread when poll is flagged to stop
Change-Id: I1bfc3a4e0a0cc7753d330a009bb295c0fce9efca
Reviewed-on: https://gerrit.libreoffice.org/35739
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 47e86ecb..26452a9b 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -209,7 +209,7 @@ void DocumentBroker::pollThread()
auto last30SecCheckTime = std::chrono::steady_clock::now();
// Main polling loop goodness.
- while (!_stop && !TerminationFlag && !ShutdownRequestFlag)
+ while (!_stop && _poll->continuePolling() && !TerminationFlag && !ShutdownRequestFlag)
{
// First, load new sessions.
for (const auto& pair : _sessions)
@@ -1290,6 +1290,7 @@ void DocumentBroker::terminateChild(std::unique_lock<std::mutex>& lock, const st
// Stop the polling thread.
_poll->stop();
+ _stop = true;
}
void DocumentBroker::closeDocument(const std::string& reason)
More information about the Libreoffice-commits
mailing list