mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-25 09:35:16 +00:00
Handle shutdown() better
This commit is contained in:
parent
447620f89f
commit
1d006e1368
@ -156,11 +156,14 @@ class Daemon(object):
|
||||
component.start()
|
||||
try:
|
||||
reactor.run()
|
||||
except KeyboardInterrupt:
|
||||
self.shutdown()
|
||||
finally:
|
||||
self._shutdown()
|
||||
|
||||
@export()
|
||||
def shutdown(self, *args, **kwargs):
|
||||
reactor.callLater(0, reactor.stop)
|
||||
|
||||
def _shutdown(self, *args, **kwargs):
|
||||
try:
|
||||
os.remove(deluge.configmanager.get_config_dir("deluged.pid"))
|
||||
except Exception, e:
|
||||
|
Loading…
x
Reference in New Issue
Block a user