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

Ashod Nakashian ashod.nakashian at collabora.co.uk
Mon Nov 28 04:57:10 UTC 2016


 wsd/LOOLWSD.cpp |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit db996c7e900c0f89edda805503120860875c2f76
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Sat Nov 26 22:47:55 2016 -0500

    loolwsd: retry shutting down the WS upon exception
    
    Change-Id: I3dc4b6f73c1ef5641c32e756099428a8ef38ee82
    Reviewed-on: https://gerrit.libreoffice.org/31288
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 64eabf0..bb1285a 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -225,6 +225,15 @@ void shutdownLimitReached(LOOLWebSocket& ws)
     catch (const std::exception& ex)
     {
         LOG_ERR("Error while shuting down socket on reaching limit: " << ex.what());
+        try
+        {
+            // Persist, in case it was unrelated error.
+            ws.shutdown(WebSocket::WS_POLICY_VIOLATION);
+        }
+        catch (const std::exception&)
+        {
+            // Nothing to do.
+        }
     }
 }
 


More information about the Libreoffice-commits mailing list