Fix pex result parsing when there is no connection
This commit is contained in:
parent
043ac5a510
commit
6207ccd559
1 changed files with 2 additions and 2 deletions
|
@ -274,10 +274,10 @@ class Peer(object):
|
||||||
added = 0
|
added = 0
|
||||||
|
|
||||||
# Remove unsupported peer types
|
# Remove unsupported peer types
|
||||||
if "peers_ipv6" in res and "ipv6" not in self.connection.server.supported_ip_types:
|
if "peers_ipv6" in res and self.connection and "ipv6" not in self.connection.server.supported_ip_types:
|
||||||
del res["peers_ipv6"]
|
del res["peers_ipv6"]
|
||||||
|
|
||||||
if "peers_onion" in res and "onion" not in self.connection.server.supported_ip_types:
|
if "peers_onion" in res and self.connection and "onion" not in self.connection.server.supported_ip_types:
|
||||||
del res["peers_onion"]
|
del res["peers_onion"]
|
||||||
|
|
||||||
# Add IPv4 + IPv6
|
# Add IPv4 + IPv6
|
||||||
|
|
Loading…
Reference in a new issue