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

New commits:
commit a02b01f3b14b332c183d03d537762ab4e53385f5
Author: Tor Lillqvist <[email protected]>
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.
    
    (cherry picked from commit 7451a48511e22586337be14721f1b8317c5c7e26)
    
    Change-Id: Iba98f054390ad8e04cdf72a342cf3d8ac08f78b7
    Reviewed-on: https://gerrit.libreoffice.org/31558
    Reviewed-by: Jan Holesovsky <[email protected]>
    Tested-by: Jan Holesovsky <[email protected]>

diff --git a/common/IoUtil.cpp b/common/IoUtil.cpp
index 32238f3..c0e6fca 100644
--- a/common/IoUtil.cpp
+++ b/common/IoUtil.cpp
@@ -89,7 +89,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();
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to