Xpra: Ticket #160: max_packet_size check is in the wrong place

It can fire from the network thread before we have had a chance to increase the limit.

Will need to apply to 0.3 too..

Fri, 06 Jul 2012 07:28:28 GMT - Antoine Martin: status changed

Here is a very simple test case:

--- src/xpra/server.py	(revision 1046)
+++ src/xpra/server.py	(working copy)
@@ -1140,6 +1140,8 @@
         modifiers = capabilities.get("modifiers", [])
         log("setting modifiers to %s", modifiers)
+        large_buffer = " "*(1024*1024)
+        self._send(["dummy", large_buffer])
         # We send the new-window packets sorted by id because this sorts them
         # from oldest to newest -- and preserving window creation order means
         # that the earliest override-redirect windows will be on the bottom,

By that point, we have already sent the hello back so a 1MB packet ought to be fine... but we see on the client:

connection lost: invalid packet: size requested is 1048576 (maximum allowed is 32768), dropping this connection!

Fri, 06 Jul 2012 08:19:05 GMT - Antoine Martin:

What makes this much more likely to fire is r1014: we wait before sending the hello to get the real screen dimensions... which means we allow cursors and new window packets to be sent before the hello!

They should all come after it!

Fri, 06 Jul 2012 08:28:51 GMT - Antoine Martin: status changed; resolution set

Sat, 23 Jan 2021 04:47:10 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/160