[Libreoffice-commits] online.git: loolwsd/test
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Thu May 12 15:26:34 UTC 2016
loolwsd/test/helpers.hpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 50b6381ff8de619720103a3e73b95bbce3e89d80
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Thu May 12 10:54:21 2016 -0400
loolwsd: break socket reading on 0 bytes
Change-Id: I30af354684b26ea5e7dc494db6601fa6248febb9
Reviewed-on: https://gerrit.libreoffice.org/24935
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/loolwsd/test/helpers.hpp b/loolwsd/test/helpers.hpp
index 2483049..65b95a3 100644
--- a/loolwsd/test/helpers.hpp
+++ b/loolwsd/test/helpers.hpp
@@ -167,7 +167,6 @@ void getResponseMessage(Poco::Net::WebSocket& ws, const std::string& prefix, std
ws.setReceiveTimeout(0);
do
{
-
if (ws.poll(waitTime, Poco::Net::Socket::SELECT_READ))
{
char buffer[READ_BUFFER_SIZE];
@@ -262,6 +261,10 @@ std::vector<char> getResponseMessage(Poco::Net::WebSocket& ws, const std::string
}
retries = 10;
+ if (bytes <= 0)
+ {
+ break;
+ }
}
else
{
More information about the Libreoffice-commits
mailing list