[Libreoffice-commits] online.git: wsd/DocumentBroker.cpp
Pranav Kant
pranavk at collabora.co.uk
Mon Sep 18 17:32:38 UTC 2017
wsd/DocumentBroker.cpp | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
New commits:
commit 7b4f734b32afc40efb1ecfa9db1a55b08541e46b
Author: Pranav Kant <pranavk at collabora.co.uk>
Date: Mon Sep 18 23:00:19 2017 +0530
Broadcast closing documents in same thread
... instead of handing it over the Document broker polling thread which
can lead to race conditions, and hence not giving desired behavior when
document is changed externally.
Change-Id: Ib0821d4ae931c357bc4d4c526865eefc090ddc23
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 9154abab..91d61c57 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -540,16 +540,12 @@ bool DocumentBroker::load(const std::shared_ptr<ClientSession>& session, const s
<< "Actual: " << fileInfo._modifiedTime << Log::end;
_documentChangedInStorage = true;
+ std::string message = "close: documentconflict";
if (_isModified)
- {
- const std::string errorMsg = "error: cmd=storage kind=documentconflict";
- session->sendTextFrame(errorMsg);
- broadcastMessage(errorMsg);
- }
- else
- {
- closeDocument("documentconflict");
- }
+ message = "error: cmd=storage kind=documentconflict";
+
+ session->sendTextFrame(message);
+ broadcastMessage(message);
}
}
More information about the Libreoffice-commits
mailing list