From a97fbbc1ef2535c803a7b59953c4fc10786a855c Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Fri, 20 Mar 2009 19:00:11 +0000 Subject: [PATCH] fix status when a host is connected --- deluge/ui/web/json_api.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deluge/ui/web/json_api.py b/deluge/ui/web/json_api.py index 1d1f4cf1b..1e91e0108 100644 --- a/deluge/ui/web/json_api.py +++ b/deluge/ui/web/json_api.py @@ -414,14 +414,14 @@ class WebApi(JSONComponent): host_id, host, port, user, password = host[0:5] hosts[host_id][3:4] = (None, None) - if client.connected() and \ - (host, port, user) == client.connection_info(): + if client.connected() and (host, port, "localclient" if not \ + user and host in ("127.0.0.1", "localhost") else \ + user) == client.connection_info(): def on_info(info): hosts[host_id][4] = info run_check() - host[5] = _("Connected") + hosts[host_id][3] = _("Connected") client.daemon.info().addCallback(on_info) - hosts[host_id] = host continue c = Client()