[Libreoffice-commits] online.git: net/WebSocketHandler.hpp
Michael Meeks
michael.meeks at collabora.com
Fri Mar 10 14:49:58 UTC 2017
net/WebSocketHandler.hpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 7a90430f85eb60a96def51fde15b324bc3a66431
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Fri Mar 10 14:49:19 2017 +0000
Cleanup logging on single packet websocket messages more cleanly.
diff --git a/net/WebSocketHandler.hpp b/net/WebSocketHandler.hpp
index b445ac7..5e987fb 100644
--- a/net/WebSocketHandler.hpp
+++ b/net/WebSocketHandler.hpp
@@ -118,6 +118,10 @@ public:
// websocket fun !
const size_t len = socket->_inBuffer.size();
+
+ if (len == 0)
+ return false; // avoid logging.
+
LOG_TRC("Incoming WebSocket data of " << len << " bytes to socket #" << socket->getFD());
if (len < 2) // partial read
@@ -216,7 +220,7 @@ public:
/// Implementation of the SocketHandlerInterface.
virtual void handleIncomingMessage() override
{
- while (handleOneIncomingMessage() && _inBuffer.size() > 0)
+ while (handleOneIncomingMessage())
; // can have multiple msgs in one recv'd packet.
}
More information about the Libreoffice-commits
mailing list