pex: avoid starting reactor twice (#7239)

This commit is contained in:
Sam Kleinman
2021-11-04 12:58:26 +01:00
committed by GitHub
parent 003d15fa4b
commit d59565d050

View File

@@ -683,9 +683,7 @@ func (n *nodeImpl) OnStart() error {
if err != nil {
return fmt.Errorf("could not dial peers from persistent-peers field: %w", err)
}
}
if n.config.P2P.PexReactor {
} else if n.config.P2P.PexReactor {
if err := n.pexReactor.Start(); err != nil {
return err
}