Skip to content

Commit

Permalink
fix: race condition in peermgt initialization reported by race detect…
Browse files Browse the repository at this point in the history
…or (#646)
  • Loading branch information
chaitanyaprem authored Aug 16, 2023
1 parent d860d82 commit f263be4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion waku/v2/node/wakunode2.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ func (w *WakuNode) Start(ctx context.Context) error {
}

w.peerConnector.SetHost(host)
w.peermanager.SetHost(host)
w.peerConnector.SetPeerManager(w.peermanager)
err = w.peerConnector.Start(ctx)
if err != nil {
Expand All @@ -398,7 +399,6 @@ func (w *WakuNode) Start(ctx context.Context) error {
}

w.relay.SetHost(host)
w.peermanager.SetHost(host)

if w.opts.enableRelay {
err := w.relay.Start(ctx)
Expand Down

0 comments on commit f263be4

Please sign in to comment.