[GTKUI] Fix connected issue in connection manager
* If host was not an ip address then it would not show as connected
This commit is contained in:
parent
a2a074fb4f
commit
ca9d0abe4b
|
@ -14,6 +14,7 @@ import time
|
||||||
|
|
||||||
import gtk
|
import gtk
|
||||||
from twisted.internet import reactor
|
from twisted.internet import reactor
|
||||||
|
from socket import gethostbyname
|
||||||
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
from deluge.common import resource_filename
|
from deluge.common import resource_filename
|
||||||
|
@ -324,9 +325,11 @@ class ConnectionManager(component.Component):
|
||||||
port = row[HOSTLIST_COL_PORT]
|
port = row[HOSTLIST_COL_PORT]
|
||||||
user = row[HOSTLIST_COL_USER]
|
user = row[HOSTLIST_COL_USER]
|
||||||
|
|
||||||
if (client.connected() and
|
if client.connected() and (
|
||||||
(host, port, "localclient" if not user and host in ("127.0.0.1", "localhost") else user)
|
gethostbyname(host),
|
||||||
== client.connection_info()):
|
port,
|
||||||
|
"localclient" if not user and host in ("127.0.0.1", "localhost") else user
|
||||||
|
) == client.connection_info():
|
||||||
def on_info(info):
|
def on_info(info):
|
||||||
if not self.running:
|
if not self.running:
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue