diff --git a/beacon-chain/sync/rpc_goodbye.go b/beacon-chain/sync/rpc_goodbye.go index 0a54c4bac..a32e8c884 100644 --- a/beacon-chain/sync/rpc_goodbye.go +++ b/beacon-chain/sync/rpc_goodbye.go @@ -42,9 +42,10 @@ func (s *Service) goodbyeRPCHandler(_ context.Context, msg interface{}, stream l return fmt.Errorf("wrong message type for goodbye, got %T, wanted *uint64", msg) } if err := s.rateLimiter.validateRequest(stream, 1); err != nil { - return err + log.WithError(err).Warn("Goodbye message from rate-limited peer.") + } else { + s.rateLimiter.add(stream, 1) } - s.rateLimiter.add(stream, 1) log := log.WithField("Reason", goodbyeMessage(*m)) log.WithField("peer", stream.Conn().RemotePeer()).Trace("Peer has sent a goodbye message") s.cfg.p2p.Peers().SetNextValidTime(stream.Conn().RemotePeer(), goodByeBackoff(*m))