common/IoUtil.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
New commits: commit 412c505430e9f61cfba11d4e4129198fccd13801 Author: Tor Lillqvist <t...@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.behr...@cib.de> Tested-by: Thorsten Behrens <thorsten.behr...@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(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits