fix: only skip if we somehow get called while not started and we aren't starting

This commit is contained in:
Derrick Hammer 2024-02-27 04:10:16 -05:00
parent e201c899f4
commit 82de843ad9
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 1 deletions

View File

@ -131,8 +131,10 @@ func (p *P2PServiceDefault) Init(ctx context.Context) error {
}
func (p *P2PServiceDefault) ConnectToNode(connectionUris []*url.URL, retried bool, fromPeer net.Peer) error {
if !p.Services().IsStarted() {
if !p.Services().IsStarting() {
return nil
}
}
unsupported, _ := url.Parse("http://0.0.0.0")
unsupported.Scheme = "unsupported"