mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
Fix deregistering signal receivers in the core.
This commit is contained in:
parent
50e6b343c3
commit
468e51c72b
2 changed files with 4 additions and 3 deletions
|
@ -50,8 +50,8 @@ class SignalManager(component.Component):
|
||||||
def deregister_client(self, address):
|
def deregister_client(self, address):
|
||||||
"""Deregisters a client"""
|
"""Deregisters a client"""
|
||||||
log.debug("Deregistering %s as a signal reciever..", address)
|
log.debug("Deregistering %s as a signal reciever..", address)
|
||||||
for client in self.clients:
|
for client in self.clients.keys():
|
||||||
if client[:len(address)] == address:
|
if client.split("//")[1].split(":")[0] == address:
|
||||||
del self.clients[client]
|
del self.clients[client]
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,8 @@ class SignalReceiver(
|
||||||
self._shutdown = True
|
self._shutdown = True
|
||||||
# De-register with the daemon so it doesn't try to send us more signals
|
# De-register with the daemon so it doesn't try to send us more signals
|
||||||
client.deregister_client()
|
client.deregister_client()
|
||||||
|
client.force_call()
|
||||||
|
|
||||||
# Hacky.. sends a request to our local receiver to ensure that it
|
# Hacky.. sends a request to our local receiver to ensure that it
|
||||||
# shutdowns.. This is because handle_request() is a blocking call.
|
# shutdowns.. This is because handle_request() is a blocking call.
|
||||||
receiver = xmlrpclib.ServerProxy("http://localhost:" + str(self.port),
|
receiver = xmlrpclib.ServerProxy("http://localhost:" + str(self.port),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue