[Libreoffice-commits] online.git: loolwsd/LOOLWSD.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Wed Jan 6 06:25:43 PST 2016
loolwsd/LOOLWSD.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 87d45ff3331f5a0b90a752211975c5d4eb690c8a
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Wed Jan 6 08:56:50 2016 -0500
loolwsd: don't timeout client socket
Change-Id: I22ca1834e22efbe01cc3e8cb78be5d0b2fbfcf4c
Reviewed-on: https://gerrit.libreoffice.org/21162
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 03dc308..979bbb4 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -207,6 +207,9 @@ void SocketProcessor(std::shared_ptr<WebSocket> ws,
{
char buffer[200000]; //FIXME: Dynamic?
+ // We should care about timeout only when we have heartbeat
+ // support. For now, we can't predict when the next message
+ // should arrive.
if ((pollTimeout = ws->poll(waitTime, Socket::SELECT_READ)))
{
n = ws->receiveFrame(buffer, sizeof(buffer), flags);
@@ -267,7 +270,7 @@ void SocketProcessor(std::shared_ptr<WebSocket> ws,
}
}
while (!TerminationFlag &&
- (!pollTimeout || (n > 0 && (flags & WebSocket::FRAME_OP_BITMASK) != WebSocket::FRAME_OP_CLOSE)));
+ (flags & WebSocket::FRAME_OP_BITMASK) != WebSocket::FRAME_OP_CLOSE);
Log::debug() << "Finishing SocketProcessor. TerminationFlag: " << TerminationFlag
<< ", pollTimeout: " << pollTimeout << ", payload size: " << n << Log::end;
}
More information about the Libreoffice-commits
mailing list