Skip to content

Commit

Permalink
#669:
Browse files Browse the repository at this point in the history
* improve debug logging
* don't try to call terminate() on the subprocess if it has exited already
* docstrings

git-svn-id: https://xpra.org/svn/Xpra/trunk@8977 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Apr 9, 2015
1 parent 0df0d75 commit d30a67a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/xpra/net/subprocess_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ def stop(self):
if p:
self.protocol = None
p.close()
log("stop() stopping mainloop %s", self.mainloop)
self.mainloop.quit()

def handle_signal(self, sig, frame):
Expand Down Expand Up @@ -295,9 +296,9 @@ def cleanup(self):
self.stop()

def stop(self):
log("%s.stop()", self)
log("stop() sending stop request to %s", self.description)
proc = self.process
if proc:
if proc and proc.poll() is None:
try:
proc.terminate()
self.process = None
Expand All @@ -306,6 +307,7 @@ def stop(self):
p = self.protocol
if p:
self.protocol = None
log("%s.stop() calling %s", self, p.close)
try:
p.close()
except Exception as e:
Expand Down
1 change: 1 addition & 0 deletions src/xpra/sound/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def stop(self):
wo = self.wrapped_object
log("stop() wrapped object=%s", wo)
if wo:
#this will stop the sound pipeline:
self.wrapped_object = None
wo.cleanup()
#this will stop the protocol and main loop
Expand Down

0 comments on commit d30a67a

Please sign in to comment.