mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-09 18:08:39 +00:00
[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
72d381a3b6
commit
7ca704be72
1 changed files with 6 additions and 2 deletions
|
@ -39,6 +39,7 @@ import urlparse
|
||||||
import time
|
import time
|
||||||
import hashlib
|
import hashlib
|
||||||
from twisted.internet import reactor
|
from twisted.internet import reactor
|
||||||
|
from socket import gethostbyname
|
||||||
|
|
||||||
import deluge.component as component
|
import deluge.component as component
|
||||||
import deluge.common
|
import deluge.common
|
||||||
|
@ -303,8 +304,11 @@ class ConnectionManager(component.Component):
|
||||||
user = row[HOSTLIST_COL_USER]
|
user = row[HOSTLIST_COL_USER]
|
||||||
password = row[HOSTLIST_COL_PASS]
|
password = row[HOSTLIST_COL_PASS]
|
||||||
|
|
||||||
if client.connected() and \
|
if client.connected() and (
|
||||||
(host, port, "localclient" if not user and host in ("127.0.0.1", "localhost") else user) == client.connection_info():
|
gethostbyname(host),
|
||||||
|
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…
Add table
Add a link
Reference in a new issue