mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-10 05:47:59 -05:00
Don't mark peer as bad as part of this return. (#4575)
This commit is contained in:
committed by
Nishant Das
parent
ccfc650375
commit
68c1ca755d
@@ -64,11 +64,6 @@ func (s *Service) AddConnectionHandler(reqFunc func(ctx context.Context, id peer
|
||||
s.peers.SetConnectionState(conn.RemotePeer(), peers.PeerDisconnected)
|
||||
return
|
||||
}
|
||||
s.peers.IncrementBadResponses(conn.RemotePeer())
|
||||
badResponses, err := s.peers.BadResponses(conn.RemotePeer())
|
||||
if err == nil && badResponses == s.peers.MaxBadResponses() {
|
||||
log.Debug("Peer has given too many bad responses; will ignore in future")
|
||||
}
|
||||
s.peers.SetConnectionState(conn.RemotePeer(), peers.PeerDisconnecting)
|
||||
if err := s.Disconnect(conn.RemotePeer()); err != nil {
|
||||
log.WithError(err).Error("Unable to disconnect from peer")
|
||||
|
||||
Reference in New Issue
Block a user