[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-1-0' - loolwsd/MasterProcessSession.cpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Sun May 29 16:12:52 UTC 2016


 loolwsd/MasterProcessSession.cpp |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 95b4807e05d0edd8caaa191b2230e363f15523bb
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Sun May 29 12:03:26 2016 -0400

    loolwsd: don't use a peer's null websocket
    
    Change-Id: I8fff570c9033bdc5694cec5a7056e9efc9de967a
    Reviewed-on: https://gerrit.libreoffice.org/25619
    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 31aa772..93fcbd0 100644
--- a/loolwsd/MasterProcessSession.cpp
+++ b/loolwsd/MasterProcessSession.cpp
@@ -661,10 +661,11 @@ void MasterProcessSession::forwardToPeer(const char *buffer, int length)
 bool MasterProcessSession::shutdownPeer(Poco::UInt16 statusCode, const std::string& message)
 {
     auto peer = _peer.lock();
-    if (peer && !peer->isCloseFrame())
+    if (peer && !peer->isCloseFrame() && peer->_ws)
     {
         peer->_ws->shutdown(statusCode, message);
     }
+
     return peer != nullptr;
 }
 


More information about the Libreoffice-commits mailing list