mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +00:00
Mitigate too many outgoing connections (#1469)
limit simultaneous outgoing connections attempts to a reasonable top as an extra layer of protection also shift the keep alive logic of the rpc handler to avoid needing to update it by hand. I think In rare cases this could make shutting down a connection a bit faster.
This commit is contained in:
@@ -743,8 +743,8 @@ impl<TSpec: EthSpec> NetworkBehaviour for Behaviour<TSpec> {
|
||||
.peer_info(peer_id)
|
||||
.map_or(true, |i| !i.has_future_duty())
|
||||
{
|
||||
//If we are at our peer limit and we don't need the peer for a future validator
|
||||
//duty, send goodbye with reason TooManyPeers
|
||||
// If we are at our peer limit and we don't need the peer for a future validator
|
||||
// duty, send goodbye with reason TooManyPeers
|
||||
Some(GoodbyeReason::TooManyPeers)
|
||||
} else {
|
||||
None
|
||||
|
||||
Reference in New Issue
Block a user