[Libreoffice-commits] online.git: loolwsd/LOOLWSD.cpp

Henry Castro hcastro at collabora.com
Thu Nov 19 03:33:57 PST 2015


 loolwsd/LOOLWSD.cpp |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 41d94bc9da0b92c435552a2e25ae17e6af4270b3
Author: Henry Castro <hcastro at collabora.com>
Date:   Thu Nov 19 07:32:48 2015 -0400

    loolwsd: clear queue before socket shutdown
    
    This cause broke pipe exception

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 79181e5..2954842 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -423,6 +423,10 @@ public:
                     }
                 }
                 while (n > 0 && (flags & WebSocket::FRAME_OP_BITMASK) != WebSocket::FRAME_OP_CLOSE);
+
+                queue.clear();
+                queue.put("eof");
+                queueHandlerThread.join();
             }
             catch (WebSocketException& exc)
             {
@@ -446,9 +450,6 @@ public:
         {
             Application::instance().logger().error(Util::logPrefix() + "IOException: " + exc.message());
         }
-        queue.clear();
-        queue.put("eof");
-        queueHandlerThread.join();
     }
 };
 


More information about the Libreoffice-commits mailing list