File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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"
You can’t perform that action at this time.
0 commit comments