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

Ashod Nakashian ashod.nakashian at collabora.co.uk
Sun Oct 23 21:07:41 UTC 2016


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

New commits:
commit a69a67e81b367e36d80f0416c135d7bc4a4738bf
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Sat Oct 22 11:41:54 2016 -0400

    loolwsd: don't do in catch what might have thrown in try
    
    Change-Id: I36d039f573529545c878d30e25f3884e2b4afeb2
    Reviewed-on: https://gerrit.libreoffice.org/30202
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 65a4153..c4f5368 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -206,11 +206,9 @@ void shutdownLimitReached(WebSocket& ws)
         }
         while (retries > 0 && (flags & WebSocket::FRAME_OP_BITMASK) != WebSocket::FRAME_OP_CLOSE);
     }
-    catch (const Exception&)
+    catch (const std::exception& ex)
     {
-        // FIXME: handle exceptions thrown from here ? ...
-        ws.sendFrame(error.data(), error.size());
-        ws.shutdown(WebSocket::WS_POLICY_VIOLATION);
+        Log::error("Error while shuting down socket on reaching limit: " + std::string(ex.what()));
     }
 }
 


More information about the Libreoffice-commits mailing list