mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-04 07:28:39 +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
1 changed files with 8 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue