mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-04 15:38:43 +00:00
fix status when a host is connected
This commit is contained in:
parent
2b96aa990e
commit
a97fbbc1ef
1 changed files with 4 additions and 4 deletions
|
@ -414,14 +414,14 @@ class WebApi(JSONComponent):
|
||||||
host_id, host, port, user, password = host[0:5]
|
host_id, host, port, user, password = host[0:5]
|
||||||
hosts[host_id][3:4] = (None, None)
|
hosts[host_id][3:4] = (None, None)
|
||||||
|
|
||||||
if client.connected() and \
|
if client.connected() and (host, port, "localclient" if not \
|
||||||
(host, port, user) == client.connection_info():
|
user and host in ("127.0.0.1", "localhost") else \
|
||||||
|
user) == client.connection_info():
|
||||||
def on_info(info):
|
def on_info(info):
|
||||||
hosts[host_id][4] = info
|
hosts[host_id][4] = info
|
||||||
run_check()
|
run_check()
|
||||||
host[5] = _("Connected")
|
hosts[host_id][3] = _("Connected")
|
||||||
client.daemon.info().addCallback(on_info)
|
client.daemon.info().addCallback(on_info)
|
||||||
hosts[host_id] = host
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
c = Client()
|
c = Client()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue