diff --git a/pkg/network/server.go b/pkg/network/server.go index 90d6858a4..7ea3f2f3b 100644 --- a/pkg/network/server.go +++ b/pkg/network/server.go @@ -187,7 +187,7 @@ func (s *Server) Shutdown() { s.log.Info("shutting down server", zap.Int("peers", s.PeerCount())) s.transport.Close() s.discovery.Close() - for p := range s.peers { + for p := range s.Peers() { p.Disconnect(errServerShutdown) } s.bQueue.discard()