diff --git a/kademlia/routing.py b/kademlia/routing.py index 3f00e92..0f9aa4c 100644 --- a/kademlia/routing.py +++ b/kademlia/routing.py @@ -1,8 +1,9 @@ import heapq import time import operator -from collections import OrderedDict +import asyncio +from collections import OrderedDict from kademlia.utils import OrderedSet, sharedPrefix @@ -158,7 +159,7 @@ class RoutingTable(object): self.splitBucket(index) self.addContact(node) else: - self.protocol.callPing(bucket.head()) + asyncio.ensure_future(self.protocol.callPing(bucket.head())) def getBucketFor(self, node): """