We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fcce5f7 commit dfd6180Copy full SHA for dfd6180
swap/src/network/swarm.rs
@@ -8,6 +8,7 @@ use libp2p::swarm::NetworkBehaviour;
8
use libp2p::SwarmBuilder;
9
use libp2p::{identity, Multiaddr, Swarm};
10
use std::fmt::Debug;
11
+use std::time::Duration;
12
13
#[allow(clippy::too_many_arguments)]
14
pub fn asb<LR>(
@@ -52,6 +53,7 @@ where
52
53
.with_tokio()
54
.with_other_transport(|_| transport)?
55
.with_behaviour(|_| behaviour)?
56
+ .with_swarm_config(|cfg| cfg.with_idle_connection_timeout(Duration::MAX))
57
.build();
58
59
Ok(swarm)
@@ -76,6 +78,7 @@ where
76
78
77
79
80
81
82
83
84
0 commit comments