From 9626255663820b708800fffa91c5f38c33d3cf09 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2026 20:59:18 +0100 Subject: libp2p: idle timeout follows keepalive --- src/transport/libp2p/config.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/transport/libp2p/config.rs') diff --git a/src/transport/libp2p/config.rs b/src/transport/libp2p/config.rs index 348a170..712f2e2 100644 --- a/src/transport/libp2p/config.rs +++ b/src/transport/libp2p/config.rs @@ -32,6 +32,9 @@ pub(crate) struct Libp2pConfig { pub(crate) public: bool, /// libp2p's in-memory transport instead of TCP and QUIC: for tests. pub(crate) memory: bool, + /// The node's keepalive interval (`--keepalive`): connections idle for a few of + /// them are closed (`idle_timeout`). + pub(crate) keepalive: Duration, } /// The multiaddrs of option `option`. @@ -138,6 +141,7 @@ impl Libp2pConfig { internet_hosts: settings.libp2p_internet_hosts.clone(), public: settings.libp2p_public, memory: false, + keepalive: settings.keepalive, }) } -- cgit v1.3.1