Skip to content

Commit

Permalink
if we get an error compressing a packet, log an error with the packet…
Browse files Browse the repository at this point in the history
… type when we have it

git-svn-id: https://xpra.org/svn/Xpra/trunk@20843 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Oct 27, 2018
1 parent 2fc14d0 commit 7c024d4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/xpra/net/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def __init__(self, scheduler, conn, process_packet_cb, get_packet_cb=None):
self.output_packetcount = 0
self.output_raw_packetcount = 0
#initial value which may get increased by client/server after handshake:
self.max_packet_size = 256*1024
self.max_packet_size = 4*1024*1024
self.abs_max_packet_size = 256*1024*1024
self.large_packets = [b"hello", b"window-metadata", b"sound-data", b"notify_show"]
self.send_aliases = {}
Expand Down Expand Up @@ -569,7 +569,11 @@ def encode(self, packet_in):
len(main_packet), packet_in[0], [type(x) for x in packet[1:]], [len(str(x)) for x in packet[1:]], repr_ellipsized(packet))
#compress, but don't bother for small packets:
if level>0 and len(main_packet)>min_comp_size:
cl, cdata = self._compress(main_packet, level)
try:
cl, cdata = self._compress(main_packet, level)
except Exception:
log.error("Error compressing '%s' packet", packet_type)
raise
packets.append((proto_flags, 0, cl, cdata))
else:
packets.append((proto_flags, 0, 0, main_packet))
Expand Down

0 comments on commit 7c024d4

Please sign in to comment.