Skip to content

Commit

Permalink
setup services before update peerinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomrsantos committed Jun 6, 2024
1 parent bccb305 commit c38524e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions libp2p/switch.nim
Original file line number Diff line number Diff line change
Expand Up @@ -349,13 +349,11 @@ proc start*(s: Switch) {.async, public.} =
s.acceptFuts.add(s.accept(t))
s.peerInfo.listenAddrs &= t.addrs

await s.peerInfo.update()

await s.ms.start()

for service in s.services:
discard await service.setup(s)

await s.peerInfo.update()
await s.ms.start()
s.started = true

debug "Started libp2p node", peer = s.peerInfo
Expand Down

0 comments on commit c38524e

Please sign in to comment.