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

New commits:
commit db996c7e900c0f89edda805503120860875c2f76
Author: Ashod Nakashian <ashod.nakash...@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 <ashnak...@gmail.com>
    Tested-by: Ashod Nakashian <ashnak...@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.
+        }
     }
 }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to