Skip to content

Commit

Permalink
#1314: cleanup the printing subsystem (and its timers) before closing…
Browse files Browse the repository at this point in the history
… the connection, add debug logging to cleanup path

git-svn-id: https://xpra.org/svn/Xpra/trunk@14102 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Oct 10, 2016
1 parent dc98a2d commit 2572789
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/xpra/client/client_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,13 +453,13 @@ def next_packet(self):
def cleanup(self):
FileTransferHandler.cleanup(self)
reaper_cleanup()
self.cleanup_printing()
p = self._protocol
log("XpraClientBase.cleanup() protocol=%s", p)
if p:
log("calling %s", p.close)
p.close()
self._protocol = None
self.cleanup_printing()
log("cleanup done")
dump_all_frames()

Expand Down Expand Up @@ -692,6 +692,7 @@ def init_printing(self):
self.printing = False

def cleanup_printing(self):
printlog("cleanup_printing() printing=%s", self.printing)
if not self.printing:
return
self.cancel_send_printers_timer()
Expand All @@ -712,6 +713,7 @@ def send_printers(self, *args):

def cancel_send_printers_timer(self):
spt = self.send_printers_timer
printlog("cancel_send_printers_timer() send_printers_timer=%s", spt)
if spt:
self.send_printers_timer = None
self.source_remove(spt)
Expand Down

0 comments on commit 2572789

Please sign in to comment.