wsd/LOOLWSD.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit a95a40ba5cbbeccde5c9ffa25d213df200782df5 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Tue Jan 3 17:03:51 2017 -0500 wsd: break the loop when shutting down WS on reaching limit Change-Id: Icc2c88d9c506197940cac8ebe14bc7ab8b2c3178 Reviewed-on: https://gerrit.libreoffice.org/32711 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 4798eaf..80bcc79 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -205,7 +205,7 @@ inline void shutdownLimitReached(LOOLWebSocket& ws) int retries = 7; std::vector<char> buffer(READ_BUFFER_SIZE * 100); - const Poco::Timespan waitTime(POLL_TIMEOUT_MS * 1000); + const Poco::Timespan waitTime(POLL_TIMEOUT_MS * 1000 / retries); do { if (ws.poll(Poco::Timespan(0), Poco::Net::Socket::SelectMode::SELECT_ERROR)) @@ -227,7 +227,7 @@ inline void shutdownLimitReached(LOOLWebSocket& ws) // Shutdown. ws.shutdown(WebSocket::WS_POLICY_VIOLATION); } - while (retries > 0 && (flags & WebSocket::FRAME_OP_BITMASK) != WebSocket::FRAME_OP_CLOSE); + while (--retries > 0 && (flags & WebSocket::FRAME_OP_BITMASK) != WebSocket::FRAME_OP_CLOSE); } catch (const std::exception& ex) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits