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

New commits:
commit 258b768218a699e1ab84cf35de89b113637f23e8
Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk>
Date:   Sat Sep 17 21:43:31 2016 -0400

    loolwsd: break receiveFrame on TerminationFlag
    
    Change-Id: Id6d71951660431abea1a393fc7fe91a88552fc04
    Reviewed-on: https://gerrit.libreoffice.org/29006
    Reviewed-by: Ashod Nakashian <ashnak...@gmail.com>
    Tested-by: Ashod Nakashian <ashnak...@gmail.com>

diff --git a/loolwsd/IoUtil.cpp b/loolwsd/IoUtil.cpp
index 1e5db62..bb861dd 100644
--- a/loolwsd/IoUtil.cpp
+++ b/loolwsd/IoUtil.cpp
@@ -40,7 +40,7 @@ namespace IoUtil
 
 int receiveFrame(WebSocket& socket, void* buffer, int length, int& flags)
 {
-    while (true)
+    while (!TerminationFlag)
     {
         int n = socket.receiveFrame(buffer, length, flags);
         if ((flags & WebSocket::FRAME_OP_BITMASK) == WebSocket::FRAME_OP_PING)
@@ -56,6 +56,8 @@ int receiveFrame(WebSocket& socket, void* buffer, int length, 
int& flags)
             return n;
         }
     }
+
+    return -1;
 }
 
 // Synchronously process WebSocket requests and dispatch to handler.
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to