[Libreoffice-commits] online.git: wsd/LOOLWSD.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Sun Mar 26 05:10:51 UTC 2017
wsd/LOOLWSD.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit c3e67575a7588cc5f05d02a98af4adffa4183cda
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Sat Mar 25 21:52:46 2017 -0400
wsd: reject the client's connection when destroying the doc in question
Change-Id: Ieb437c9a35af6e809a08e5835aabb18db3934040
Reviewed-on: https://gerrit.libreoffice.org/35710
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 120671e8..7f4fd5bb 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -1256,7 +1256,11 @@ static std::shared_ptr<DocumentBroker> findOrCreateDocBroker(WebSocketHandler& w
// destruction when we add the session, -or- the client
// re-connects.
if (docBroker->isMarkedToDestroy())
- LOG_WRN("Associating with Document Broker with docKey [" << docKey << "] that is marked to be destroyed!");
+ {
+ LOG_WRN("DocBroker with docKey [" << docKey << "] that is marked to be destroyed. Rejecting client request.");
+ ws.shutdown(WebSocketHandler::StatusCodes::ENDPOINT_GOING_AWAY, "error: cmd=load kind=docunloading");
+ return false;
+ }
}
else
{
More information about the Libreoffice-commits
mailing list