Skip to content

Commit 3abe1d9

Browse files
committed
review comments
1 parent 5a0b7ba commit 3abe1d9

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

waku/discovery/waku_kademlia.nim

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ proc runDiscoveryLoop(
194194
info "extended kademlia discovery loop started", interval = interval
195195

196196
try:
197-
while wk.running:
197+
while true:
198198
# Wait for node to be started
199199
if not wk.isNodeStarted.isNil() and not wk.isNodeStarted():
200200
await sleepAsync(ExtendedKademliaDiscoveryStartupDelay)
@@ -203,8 +203,8 @@ proc runDiscoveryLoop(
203203
var records: seq[ExtendedPeerRecord]
204204
try:
205205
records = await wk.protocol.randomRecords()
206-
except CatchableError:
207-
warn "extended kademlia discovery failed", error = getCurrentExceptionMsg()
206+
except CatchableError as e:
207+
warn "extended kademlia discovery failed", error = e.msg
208208
await sleepAsync(interval)
209209
continue
210210

@@ -258,7 +258,6 @@ proc start*(
258258
except CatchableError as e:
259259
return err("failed to start kademlia discovery: " & e.msg)
260260

261-
wk.running = true
262261
wk.discoveryLoop = wk.runDiscoveryLoop(interval, minMixPeers)
263262

264263
info "kademlia discovery started"

0 commit comments

Comments
 (0)