From 3868dea8190eccd2e02a8af8c60cdbfba9ce9b77 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Thu, 21 Feb 2019 14:18:48 -0500 Subject: [PATCH] don't join buckets if there is only one --- lbrynet/dht/protocol/routing_table.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lbrynet/dht/protocol/routing_table.py b/lbrynet/dht/protocol/routing_table.py index b21b86559..3653f453f 100644 --- a/lbrynet/dht/protocol/routing_table.py +++ b/lbrynet/dht/protocol/routing_table.py @@ -281,6 +281,8 @@ class TreeRoutingTable: old_bucket.remove_peer(contact) def join_buckets(self): + if len(self.buckets) == 1: + return to_pop = [i for i, bucket in enumerate(self.buckets) if not len(bucket)] if not to_pop: return