Skip to content

Commit f263be4

Browse files
fix: race condition in peermgt initialization reported by race detector (#646)
1 parent d860d82 commit f263be4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

waku/v2/node/wakunode2.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ func (w *WakuNode) Start(ctx context.Context) error {
384384
}
385385

386386
w.peerConnector.SetHost(host)
387+
w.peermanager.SetHost(host)
387388
w.peerConnector.SetPeerManager(w.peermanager)
388389
err = w.peerConnector.Start(ctx)
389390
if err != nil {
@@ -398,7 +399,6 @@ func (w *WakuNode) Start(ctx context.Context) error {
398399
}
399400

400401
w.relay.SetHost(host)
401-
w.peermanager.SetHost(host)
402402

403403
if w.opts.enableRelay {
404404
err := w.relay.Start(ctx)

0 commit comments

Comments
 (0)