Skip to content

Commit 770d677

Browse files
AgeManningjxs
andauthored
Increase idle connection timeout (#6604)
* Increase idle connection timeout * Update beacon_node/lighthouse_network/src/service/mod.rs Co-authored-by: João Oliveira <hello@jxs.pt>
1 parent f8e31f6 commit 770d677

File tree

1 file changed

+3
-0
lines changed
  • beacon_node/lighthouse_network/src/service

1 file changed

+3
-0
lines changed

beacon_node/lighthouse_network/src/service/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ use std::num::{NonZeroU8, NonZeroUsize};
3838
use std::path::PathBuf;
3939
use std::pin::Pin;
4040
use std::sync::Arc;
41+
use std::time::Duration;
4142
use types::{
4243
consts::altair::SYNC_COMMITTEE_SUBNET_COUNT, EnrForkId, EthSpec, ForkContext, Slot, SubnetId,
4344
};
@@ -466,6 +467,8 @@ impl<E: EthSpec> Network<E> {
466467
let config = libp2p::swarm::Config::with_executor(Executor(executor))
467468
.with_notify_handler_buffer_size(NonZeroUsize::new(7).expect("Not zero"))
468469
.with_per_connection_event_buffer_size(4)
470+
.with_idle_connection_timeout(Duration::from_secs(10)) // Other clients can timeout
471+
// during negotiation
469472
.with_dial_concurrency_factor(NonZeroU8::new(1).unwrap());
470473

471474
let builder = SwarmBuilder::with_existing_identity(local_keypair)

0 commit comments

Comments
 (0)