[Libreoffice-commits] online.git: net/WebSocketHandler.hpp
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Thu Mar 12 18:16:18 UTC 2020
net/WebSocketHandler.hpp | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
New commits:
commit 5b9bbea3aaeeb756305d1ec1764a975bf235351b
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Thu Mar 12 19:01:39 2020 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Thu Mar 12 19:15:56 2020 +0100
Fix assertion failure in the MOBILEAPP case
Change-Id: I5c3647d1cc6975bd56b9c5276f6eba7585ac785c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90432
Tested-by: Tor Lillqvist <tml at collabora.com>
Reviewed-by: Tor Lillqvist <tml at collabora.com>
diff --git a/net/WebSocketHandler.hpp b/net/WebSocketHandler.hpp
index 1c2977602..3a01fea17 100644
--- a/net/WebSocketHandler.hpp
+++ b/net/WebSocketHandler.hpp
@@ -616,16 +616,21 @@ private:
out.insert(out.end(), data, data + len);
}
const size_t size = out.size() - oldSize;
+
+ if (flush)
+ socket->writeOutgoingData();
#else
LOG_TRC("WebSocketHandle::sendFrame: Writing to #" << socket->getFD() << " " << len << " bytes");
- assert(flush);
- assert(out.size() == 0);
+ // We ignore the flush parameter and always flush in the MOBILEAPP case because there is no
+ // WebSocket framing, we put the messages as such into the FakeSocket queue.
+
+ (void) flush;
out.insert(out.end(), data, data + len);
const size_t size = out.size();
+
+ socket->writeOutgoingData();
#endif
- if (flush)
- socket->writeOutgoingData();
return size;
}
More information about the Libreoffice-commits
mailing list