[Libreoffice-commits] online.git: loolwsd/LOOLWSD.cpp
Henry Castro
hcastro at collabora.com
Thu Dec 10 14:20:36 PST 2015
loolwsd/LOOLWSD.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit a01de999621a1bf577f0a68b2f403e1112667d45
Author: Henry Castro <hcastro at collabora.com>
Date: Thu Dec 10 18:15:45 2015 -0400
loolwsd: handle pong frame
pong frame is received from IE11, with payload data length = 0
diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 8838a22..184ddfd 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -395,7 +395,11 @@ public:
{
n = ws->receiveFrame(buffer, sizeof(buffer), flags);
- if (n > 0 && (flags & WebSocket::FRAME_OP_BITMASK) != WebSocket::FRAME_OP_CLOSE)
+ if ((flags & WebSocket::FRAME_OP_BITMASK) == WebSocket::FRAME_OP_PONG)
+ {
+ n = 1;
+ }
+ else if (n > 0 && (flags & WebSocket::FRAME_OP_BITMASK) != WebSocket::FRAME_OP_CLOSE)
{
std::string firstLine = getFirstLine(buffer, n);
StringTokenizer tokens(firstLine, " ", StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM);
More information about the Libreoffice-commits
mailing list