Skip to content

Commit

Permalink
add debug logging
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@9338 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed May 13, 2015
1 parent 23e87db commit e2e0520
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
8 changes: 5 additions & 3 deletions src/xpra/net/bytestreams.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,18 @@ def close(self):
Connection.close(self)
try:
self._readable.close()
except:
pass
except Exception as e:
log("%s.close() %s", self._readable, e)
try:
self._writeable.close()
except:
pass
log("%s.close() %s", self._writeable, e)
cc = self._close_cb
if cc:
self._close_cb = None
log("%s.close() calling %s", self, cc)
cc()
log("%s.close() done", self)

def __repr__(self):
return "TwoFileConnection(%s)" % str(self.target)
Expand Down
3 changes: 2 additions & 1 deletion src/xpra/net/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ def wait_for_write_lock(timeout=100):
wait_for_write_lock()

def close(self):
log("close() closed=%s", self._closed)
log("Protocol.close() closed=%s", self._closed)
if self._closed:
return
self._closed = True
Expand All @@ -894,6 +894,7 @@ def close(self):
self._conn = None
self.terminate_queue_threads()
self.idle_add(self.clean)
log("Protocol.close() done")

def steal_connection(self, read_callback=None):
#so we can re-use this connection somewhere else
Expand Down
4 changes: 2 additions & 2 deletions src/xpra/net/subprocess_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def stop(self):
self.stop_protocol()

def stop_process(self):
log("stop() sending stop request to %s", self.description)
log("%s.stop_process() sending stop request to %s", self, self.description)
proc = self.process
if proc and proc.poll() is None:
try:
Expand All @@ -331,7 +331,7 @@ def stop_protocol(self):
p = self.protocol
if p:
self.protocol = None
log("%s.stop() calling %s", self, p.close)
log("%s.stop_protocol() calling %s", self, p.close)
try:
p.close()
except Exception as e:
Expand Down

0 comments on commit e2e0520

Please sign in to comment.