net/WebSocketHandler.hpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
New commits: commit 5b9bbea3aaeeb756305d1ec1764a975bf235351b Author: Tor Lillqvist <[email protected]> AuthorDate: Thu Mar 12 19:01:39 2020 +0200 Commit: Tor Lillqvist <[email protected]> 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 <[email protected]> Reviewed-by: Tor Lillqvist <[email protected]> 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; } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
