From ed801be80ebbbce2719c8be80862dc635e452938 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Mon, 28 Jan 2019 17:16:21 +0000 Subject: [PATCH] wait until after we have sent the last chunk before enabling NODELAY git-svn-id: https://xpra.org/svn/Xpra/trunk@21493 3bb7dfac-3a0b-4e04-842a-767bc560f471 --- src/xpra/net/protocol.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)