don't join buckets if there is only one
This commit is contained in:
parent
c52541197f
commit
3868dea819
1 changed files with 2 additions and 0 deletions
|
@ -281,6 +281,8 @@ class TreeRoutingTable:
|
||||||
old_bucket.remove_peer(contact)
|
old_bucket.remove_peer(contact)
|
||||||
|
|
||||||
def join_buckets(self):
|
def join_buckets(self):
|
||||||
|
if len(self.buckets) == 1:
|
||||||
|
return
|
||||||
to_pop = [i for i, bucket in enumerate(self.buckets) if not len(bucket)]
|
to_pop = [i for i, bucket in enumerate(self.buckets) if not len(bucket)]
|
||||||
if not to_pop:
|
if not to_pop:
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue