mirror of
https://github.com/logos-storage/deluge.git
synced 2026-01-07 23:53:12 +00:00
Fix properly disconnecting from the currently connected daemon when connecting to a different daemon
This commit is contained in:
parent
2089fd1823
commit
ee442536a8
@ -414,7 +414,14 @@ class ConnectionManager(component.Component):
|
|||||||
user = model[row][HOSTLIST_COL_USER]
|
user = model[row][HOSTLIST_COL_USER]
|
||||||
password = model[row][HOSTLIST_COL_PASS]
|
password = model[row][HOSTLIST_COL_PASS]
|
||||||
|
|
||||||
|
def do_connect(*args):
|
||||||
client.connect(host, port, user, password).addCallback(self.__on_connected, host_id)
|
client.connect(host, port, user, password).addCallback(self.__on_connected, host_id)
|
||||||
|
|
||||||
|
if client.connected():
|
||||||
|
client.disconnect().addCallback(do_connect)
|
||||||
|
else:
|
||||||
|
do_connect()
|
||||||
|
|
||||||
self.connection_manager.response(gtk.RESPONSE_OK)
|
self.connection_manager.response(gtk.RESPONSE_OK)
|
||||||
|
|
||||||
def on_button_close_clicked(self, widget):
|
def on_button_close_clicked(self, widget):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user