diff --git a/pkg/network/server.go b/pkg/network/server.go index dacac6461..3e0eb6575 100644 --- a/pkg/network/server.go +++ b/pkg/network/server.go @@ -226,7 +226,8 @@ func (s *Server) run() { s.lock.RLock() // Pick a random peer and drop connection to it. for peer := range s.peers { - peer.Disconnect(errMaxPeers) + // It will send us unregister signal. + go peer.Disconnect(errMaxPeers) break } s.lock.RUnlock()