[Libreoffice-commits] online.git: loolwsd/MasterProcessSession.cpp
Pranav Kant
pranavk at collabora.com
Fri Feb 19 21:56:30 UTC 2016
loolwsd/MasterProcessSession.cpp | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit a2549e3df708426052dcb4e29773aa95fcc85258
Author: Pranav Kant <pranavk at collabora.com>
Date: Thu Feb 18 00:14:25 2016 +0530
loolwsd: Disconnect the child if there is no client
Don't let them hanging around, otherwise we would keep sending
messages to a dead peer (ToClient) indefinitely.
Change-Id: I9d4bb6edee351bd31f1faa30deaa4f37c3c7d031
Reviewed-on: https://gerrit.libreoffice.org/22465
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/loolwsd/MasterProcessSession.cpp b/loolwsd/MasterProcessSession.cpp
index d9b4f33..19d780a 100644
--- a/loolwsd/MasterProcessSession.cpp
+++ b/loolwsd/MasterProcessSession.cpp
@@ -125,6 +125,12 @@ bool MasterProcessSession::_handleInput(const char *buffer, int length)
if (_kind == Kind::ToPrisoner)
{
+ if (!peer)
+ {
+ LOOLSession::disconnect();
+ return false;
+ }
+
if (tokens[0] == "error:")
{
std::string errorCommand;
More information about the Libreoffice-commits
mailing list