Skip to content

Commit

Permalink
Increase idle connection timeout (#6604)
Browse files Browse the repository at this point in the history
* Increase idle connection timeout

* Update beacon_node/lighthouse_network/src/service/mod.rs

Co-authored-by: João Oliveira <[email protected]>
  • Loading branch information
AgeManning and jxs authored Dec 2, 2024
1 parent f8e31f6 commit 770d677
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions beacon_node/lighthouse_network/src/service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ use std::num::{NonZeroU8, NonZeroUsize};
use std::path::PathBuf;
use std::pin::Pin;
use std::sync::Arc;
use std::time::Duration;
use types::{
consts::altair::SYNC_COMMITTEE_SUBNET_COUNT, EnrForkId, EthSpec, ForkContext, Slot, SubnetId,
};
Expand Down Expand Up @@ -466,6 +467,8 @@ impl<E: EthSpec> Network<E> {
let config = libp2p::swarm::Config::with_executor(Executor(executor))
.with_notify_handler_buffer_size(NonZeroUsize::new(7).expect("Not zero"))
.with_per_connection_event_buffer_size(4)
.with_idle_connection_timeout(Duration::from_secs(10)) // Other clients can timeout
// during negotiation
.with_dial_concurrency_factor(NonZeroU8::new(1).unwrap());

let builder = SwarmBuilder::with_existing_identity(local_keypair)
Expand Down

0 comments on commit 770d677

Please sign in to comment.