Skip to content

Commit

Permalink
wait until after we have sent the last chunk before enabling NODELAY
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@21493 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jan 28, 2019
1 parent d41a961 commit ed801be
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/xpra/net/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,14 +625,17 @@ 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)
except:
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)
Expand Down

0 comments on commit ed801be

Please sign in to comment.