mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-21 03:54:50 +00:00
Disconnect from daemon if getting the info fails
This commit is contained in:
parent
43a5a9111b
commit
43df21517e
1 changed files with 3 additions and 2 deletions
|
@ -271,16 +271,17 @@ class ConnectionManager(component.Component):
|
|||
self.__update_buttons()
|
||||
c.disconnect()
|
||||
|
||||
def on_info_fail(reason):
|
||||
def on_info_fail(reason, c):
|
||||
if not self.running:
|
||||
return
|
||||
if row:
|
||||
row[HOSTLIST_COL_STATUS] = _("Offline")
|
||||
self.__update_buttons()
|
||||
c.disconnect()
|
||||
|
||||
d = c.daemon.info()
|
||||
d.addCallback(on_info, c)
|
||||
d.addErrback(on_info_fail)
|
||||
d.addErrback(on_info_fail, c)
|
||||
|
||||
def on_connect_failed(reason, host_info):
|
||||
if not self.running:
|
||||
|
|
Loading…
Add table
Reference in a new issue