mirror of
https://github.com/status-im/go-waku.git
synced 2025-02-05 02:15:00 +00:00
fix: race condition in peermgt initialization reported by race detector (#646)
This commit is contained in:
parent
d860d825c1
commit
f263be4a74
@ -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 {
|
||||
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user