Skip to content
Snippets Groups Projects
Commit 99f8c295 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

python: rename bootstrap(sockaddr) to ping

parent 4132c63f
No related branches found
No related tags found
No related merge requests found
...@@ -333,7 +333,7 @@ cdef class DhtRunner(_WithID): ...@@ -333,7 +333,7 @@ cdef class DhtRunner(_WithID):
return h return h
def getNodeId(self): def getNodeId(self):
return self.thisptr.get().getNodeId().toString() return self.thisptr.get().getNodeId().toString()
def bootstrap(self, SockAddr addr, done_cb=None): def ping(self, SockAddr addr, done_cb=None):
if done_cb: if done_cb:
cb_obj = {'done':done_cb} cb_obj = {'done':done_cb}
ref.Py_INCREF(cb_obj) ref.Py_INCREF(cb_obj)
...@@ -350,7 +350,7 @@ cdef class DhtRunner(_WithID): ...@@ -350,7 +350,7 @@ cdef class DhtRunner(_WithID):
lock.notify() lock.notify()
with lock: with lock:
pending += 1 pending += 1
self.bootstrap(addr, done_cb=tmp_done) self.ping(addr, done_cb=tmp_done)
while pending > 0: while pending > 0:
lock.wait() lock.wait()
return ok return ok
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment