diff options
author | Pedro Algarvio <ufs@ufsoft.org> | 2011-04-28 16:53:20 +0100 |
---|---|---|
committer | Pedro Algarvio <ufs@ufsoft.org> | 2011-04-28 16:59:01 +0100 |
commit | 63d0d0c69bbc77f151c2bf38b806895b603e039f (patch) | |
tree | 1848ce82991f075bb5285b0d34282c796772a14d /deluge/ui/client.py | |
parent | 1be59bb1160ff90866e41f21eea3e4af409ee91d (diff) | |
download | deluge-63d0d0c69bbc77f151c2bf38b806895b603e039f.tar.gz deluge-63d0d0c69bbc77f151c2bf38b806895b603e039f.tar.bz2 deluge-63d0d0c69bbc77f151c2bf38b806895b603e039f.zip |
GTK UI connection manager fixes.
Auto-connecting to daemon now works. Fixes #1815.
Auto-starting a `localhost` daemon now also works, the reconnecting attempts were not being "triggered".
When not connected to a daemon, "Quit & Shutdown Daemon" is not present. So #1818 is also fixed.
Some more work regarding #1819 was done.
Client now disconnects before shutting down the GTK UI.
Diffstat (limited to 'deluge/ui/client.py')
-rw-r--r-- | deluge/ui/client.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/deluge/ui/client.py b/deluge/ui/client.py index a6b17b922..dc39fb192 100644 --- a/deluge/ui/client.py +++ b/deluge/ui/client.py @@ -607,13 +607,15 @@ class Client(object): self._daemon_proxy = DaemonSSLProxy(dict(self.__event_handlers)) self._daemon_proxy.set_disconnect_callback(self.__on_disconnect) d = self._daemon_proxy.connect(host, port) + auth_deferred = defer.Deferred() + def on_connect_fail(reason): self.disconnect() + auth_deferred.errback(reason) return reason d.addErrback(on_connect_fail) if not skip_authentication: - auth_deferred = defer.Deferred() def on_authenticate(result, daemon_info): log.debug("Authentication sucessfull: %s", result) |