From 6207ccd5599e98db6e9d25d38c0dc3c9bc0cb327 Mon Sep 17 00:00:00 2001 From: shortcutme Date: Thu, 2 May 2019 17:17:57 +0200 Subject: [PATCH] Fix pex result parsing when there is no connection --- src/Peer/Peer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Peer/Peer.py b/src/Peer/Peer.py index 63928c02..c1d3652f 100644 --- a/src/Peer/Peer.py +++ b/src/Peer/Peer.py @@ -274,10 +274,10 @@ class Peer(object): added = 0 # 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"] - 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"] # Add IPv4 + IPv6