aboutsummaryrefslogtreecommitdiffstats
path: root/src/transport/libp2p/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/libp2p/config.rs')
-rw-r--r--src/transport/libp2p/config.rs4
1 files changed, 4 insertions, 0 deletions
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,
})
}