Fix showing connected status in connection manager

This commit is contained in:
Andrew Resch 2009-03-20 18:55:54 +00:00
parent 9ca7634ec9
commit 2b96aa990e
1 changed files with 3 additions and 1 deletions

View File

@ -272,7 +272,9 @@ class ConnectionManager(component.Component):
port = row[HOSTLIST_COL_PORT]
user = row[HOSTLIST_COL_USER]
password = row[HOSTLIST_COL_PASS]
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):
if not self.running:
return