]> git.mxchange.org Git - quix0rs-apt-p2p.git/blobdiff - ktable.py
fix peer update problem connection refused in store value
[quix0rs-apt-p2p.git] / ktable.py
index 711a537f4ad3eaa3b3b62f5f7a7d0e0757706e15..aa86eb9bb66895024349a513afaa3b822a7764b6 100644 (file)
--- a/ktable.py
+++ b/ktable.py
@@ -125,10 +125,11 @@ class KTable:
            if contacted:
                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(node)
+               self.buckets[i].l.append(xnode)
                self.buckets[i].touch()
            return