[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-1-9' - 2 commits - loolwsd/DocumentBroker.cpp loolwsd/LOOLWSD.cpp
Jan Holesovsky
kendy at collabora.com
Thu Nov 10 14:22:55 UTC 2016
loolwsd/DocumentBroker.cpp | 2 --
loolwsd/LOOLWSD.cpp | 6 +++++-
2 files changed, 5 insertions(+), 3 deletions(-)
New commits:
commit c4cd52398cac19c3fd86745d39e9360713c1091a
Author: Jan Holesovsky <kendy at collabora.com>
Date: Thu Nov 10 13:10:46 2016 +0100
Block when working via http.
It looks like that the implementation details of POCO are thread-unsafe when
in non-blocking mode, and that is even when the actual sending of the frames
is guarded by a mutex.
Needs more research; but for the moment, enable non-blocking mode for HTTP.
Change-Id: Idcce3fb55bae73c17d9fc321a2273256c0396664
(cherry picked from commit b8b469c9b2f052e16eeb6d6fdd76638e697763e7)
diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 87cf4a6..7c7f03d 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -1123,7 +1123,11 @@ public:
try
{
// First, setup WS options.
- ws->setBlocking(false);
+ // FIXME HACK: This needs a bit deeper research; for the
+ // moment we block with HTTP because non-blocking causes
+ // problems; maybe we need that for HTTPS too - to be
+ // tested
+ ws->setBlocking(!LOOLWSD::isSSLEnabled());
ws->setSendTimeout(WS_SEND_TIMEOUT_MS * 1000);
std::string decodedUri;
URI::decode(reqPathTokens[1], decodedUri);
commit 3777d4b9ae2c131dab89e8f8eba481787c1a86d5
Author: Pranav Kant <pranavk at collabora.co.uk>
Date: Thu Nov 10 16:30:17 2016 +0530
This was only meant for debugging.
Change-Id: Ia31847ab45c1aa18b5d9d4187ac552d7486331e7
(cherry picked from commit b1cec28cc33bb453e509be41fc6a9f03d2a686ac)
diff --git a/loolwsd/DocumentBroker.cpp b/loolwsd/DocumentBroker.cpp
index 295e07c..edc453e 100644
--- a/loolwsd/DocumentBroker.cpp
+++ b/loolwsd/DocumentBroker.cpp
@@ -917,8 +917,6 @@ void DocumentBroker::terminateChild(std::unique_lock<std::mutex>& lock, const st
pair.second->shutdown(Poco::Net::WebSocket::WS_ENDPOINT_GOING_AWAY, closeReason);
}
- std::this_thread::sleep_for (std::chrono::seconds(5));
-
// First flag to stop as it might be waiting on our lock
// to process some incoming message.
_childProcess->stop();
More information about the Libreoffice-commits
mailing list