diff --git a/src/xpra/net/protocol.py b/src/xpra/net/protocol.py index a71a2cd6c7..0522f1eefc 100644 --- a/src/xpra/net/protocol.py +++ b/src/xpra/net/protocol.py @@ -625,7 +625,8 @@ def write_items(self, buf_data, start_cb=None, end_cb=None, fail_cb=None, synchr conn = self._conn if not conn: return False - conn.set_nodelay(not more) + if more: + conn.set_nodelay(False) if start_cb: try: start_cb(conn.output_bytecount) @@ -633,6 +634,8 @@ def write_items(self, buf_data, start_cb=None, end_cb=None, fail_cb=None, synchr if not self._closed: log.error("Error on write start callback %s", start_cb, exc_info=True) self.write_buffers(buf_data, fail_cb, synchronous) + if not more: + conn.set_nodelay(True) if end_cb: try: end_cb(self._conn.output_bytecount)