[Libreoffice-commits] online.git: Branch 'libreoffice-5-3' - common/IoUtil.cpp

Tor Lillqvist tml at collabora.com
Mon Mar 27 01:17:37 UTC 2017


 common/IoUtil.cpp |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 412c505430e9f61cfba11d4e4129198fccd13801
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Dec 2 16:51:11 2016 +0200

    Handle return value -1 from our LOOLWebSocket::receiveFrame()
    
    It doesn't mean anything is wrong or that the connection would be in
    some invalid or closed state, but just that we didn't actually receive
    any "interesting" frame that could be handled in the caller.
    
    Change-Id: Iba98f054390ad8e04cdf72a342cf3d8ac08f78b7
    Reviewed-on: https://gerrit.libreoffice.org/35352
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/common/IoUtil.cpp b/common/IoUtil.cpp
index 1250066f..04eca76a 100644
--- a/common/IoUtil.cpp
+++ b/common/IoUtil.cpp
@@ -90,7 +90,12 @@ void SocketProcessor(const std::shared_ptr<LOOLWebSocket>& ws,
                 continue;
             }
 
-            if (n <= 0 || ((flags & WebSocket::FRAME_OP_BITMASK) == WebSocket::FRAME_OP_CLOSE))
+            if (n == -1)
+            {
+                LOG_DBG("SocketProcessor [" << name << "]: was not an interesting frame, nothing to do here");
+                continue;
+            }
+            else if (n == 0 || ((flags & WebSocket::FRAME_OP_BITMASK) == WebSocket::FRAME_OP_CLOSE))
             {
                 LOG_WRN("SocketProcessor [" << name << "]: Connection closed.");
                 closeFrame();


More information about the Libreoffice-commits mailing list