Fix stopping signalreceiver

This commit is contained in:
Andrew Resch 2008-02-22 09:10:59 +00:00
parent 1e02029fe1
commit 5aa3bfd16d
1 changed files with 7 additions and 3 deletions

View File

@ -70,8 +70,12 @@ class SignalReceiver(
"""Shutdowns receiver thread"""
self._shutdown = True
# De-register with the daemon so it doesn't try to send us more signals
client.deregister_client()
client.force_call()
try:
client.deregister_client()
client.force_call()
except:
pass
log.debug("Shutting down signalreceiver")
# Hacky.. sends a request to our local receiver to ensure that it
# shutdowns.. This is because handle_request() is a blocking call.