From c8e3717344600f6a0acd71b67fc37c67c5f7d5d3 Mon Sep 17 00:00:00 2001 From: Cameron Dale Date: Fri, 7 Mar 2008 16:06:57 -0800 Subject: [PATCH] Add new node to table when refreshing old node. Fixes a bug introduced by commit: 6ce38471: fix peer update problem connection refused in store value --- apt_p2p_Khashmir/ktable.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apt_p2p_Khashmir/ktable.py b/apt_p2p_Khashmir/ktable.py index fb0c371..fe117ee 100644 --- a/apt_p2p_Khashmir/ktable.py +++ b/apt_p2p_Khashmir/ktable.py @@ -169,11 +169,10 @@ class KTable: # It responded, so update it node.updateLastSeen() # move node to end of bucket - xnode = self.buckets[i].l[it] del(self.buckets[i].l[it]) # note that we removed the original and replaced it with the new one # utilizing this nodes new contact info - self.buckets[i].l.append(xnode) + self.buckets[i].l.append(node) self.buckets[i].touch() return -- 2.30.2