diff --git a/beacon-chain/p2p/service.go b/beacon-chain/p2p/service.go index 2c16e4f43..12af0138d 100644 --- a/beacon-chain/p2p/service.go +++ b/beacon-chain/p2p/service.go @@ -259,7 +259,7 @@ func (s *Service) listenForNewNodes() { s.connectWithAllPeers(multiAddresses) case <-s.ctx.Done(): log.Debug("p2p context is closed, exiting routine") - break + return } } }