From 9923d288e03a24215e3cc90a7e95abbdfa6cdd1f Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Mon, 25 Sep 2017 09:17:15 +0200 Subject: [PATCH] Dandelion fixes - in route selector, some connections may not have the services attribute (yet) - Addresses #1049 --- src/network/connectionpool.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/network/connectionpool.py b/src/network/connectionpool.py index fae509c7..2943200b 100644 --- a/src/network/connectionpool.py +++ b/src/network/connectionpool.py @@ -61,10 +61,13 @@ class BMConnectionPool(object): for i in connections: if i == node: continue - if i.services | protocol.NODE_DANDELION: - peers.append(i) - if len(peers) == 2: - break + try: + if i.services | protocol.NODE_DANDELION: + peers.append(i) + if len(peers) == 2: + break + except AttributeError: + continue return peers def connectToStream(self, streamNumber):