Disconnect from peers quicker on internet issues (#2147)

## Issue Addressed

Fixes #2146 

## Proposed Changes

Change ping timeout errors to return `LowToleranceErrors` so that we disconnect faster on internet failures/changes.
This commit is contained in:
Pawan Dhananjay 2021-01-13 08:09:10 +00:00
parent 14df5d5c32
commit 28238d97b1

View File

@ -480,7 +480,7 @@ impl<TSpec: EthSpec> PeerManager<TSpec> {
Protocol::Status => return, Protocol::Status => return,
}, },
}, },
RPCError::NegotiationTimeout => PeerAction::HighToleranceError, RPCError::NegotiationTimeout => PeerAction::LowToleranceError,
}; };
self.report_peer(peer_id, peer_action, ReportSource::RPC); self.report_peer(peer_id, peer_action, ReportSource::RPC);