summaryrefslogtreecommitdiffstats
path: root/deluge/ui/client.py
diff options
context:
space:
mode:
authorAndrew Resch <andrewresch@gmail.com>2011-06-02 11:55:26 -0700
committerAndrew Resch <andrewresch@gmail.com>2011-06-02 11:55:26 -0700
commitac5f9a282822917fb466086f16fc2c43279196fa (patch)
tree5c5047e053c6261d1ed09b586dc579d5854d9d72 /deluge/ui/client.py
parent6d55c44983b179d157d6e6a59d6a5a251c66477c (diff)
downloaddeluge-ac5f9a282822917fb466086f16fc2c43279196fa.tar.gz
deluge-ac5f9a282822917fb466086f16fc2c43279196fa.tar.bz2
deluge-ac5f9a282822917fb466086f16fc2c43279196fa.zip
Fix up stopping classic mode
Diffstat (limited to 'deluge/ui/client.py')
-rw-r--r--deluge/ui/client.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/deluge/ui/client.py b/deluge/ui/client.py
index b2de0b138..31fb305a3 100644
--- a/deluge/ui/client.py
+++ b/deluge/ui/client.py
@@ -613,6 +613,11 @@ class Client(object):
"""
Disconnects from the daemon.
"""
+ if self.is_classicmode():
+ self._daemon_proxy.disconnect()
+ self.stop_classic_mode()
+ return
+
if self._daemon_proxy:
return self._daemon_proxy.disconnect()
@@ -623,6 +628,13 @@ class Client(object):
self._daemon_proxy = DaemonClassicProxy(self.__event_handlers)
self.__started_in_classic = True
+ def stop_classic_mode(self):
+ """
+ Stops the daemon process in the client.
+ """
+ self._daemon_proxy = None
+ self.__started_in_classic = False
+
def start_daemon(self, port, config):
"""
Starts a daemon process.