Skip to content

Commit 609dc3b

Browse files
authored
chore(deps): bump futures-bounded
Pull-Request: #6220.
1 parent 8072a73 commit 609dc3b

File tree

13 files changed

+32
-20
lines changed

13 files changed

+32
-20
lines changed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ libp2p-yamux = { version = "0.47.0", path = "muxers/yamux" }
121121
asynchronous-codec = { version = "0.7.0" }
122122
env_logger = "0.11"
123123
futures = "0.3.30"
124-
futures-bounded = { version = "0.2.4" }
124+
futures-bounded = { version = "0.3", features = ["tokio"]}
125125
futures-rustls = { version = "0.26.0", default-features = false }
126126
getrandom = "0.2"
127127
if-watch = "3.2.1"

protocols/autonat/src/v2/client/handler/dial_back.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub struct Handler {
2222
impl Handler {
2323
pub(crate) fn new() -> Self {
2424
Self {
25-
inbound: StreamSet::new(Duration::from_secs(5), 2),
25+
inbound: StreamSet::new(|| futures_bounded::Delay::tokio(Duration::from_secs(5)), 2),
2626
}
2727
}
2828
}

protocols/autonat/src/v2/client/handler/dial_request.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ impl Handler {
9191
pub(crate) fn new() -> Self {
9292
Self {
9393
queued_events: VecDeque::new(),
94-
outbound: FuturesMap::new(Duration::from_secs(10), 10),
94+
outbound: FuturesMap::new(
95+
|| futures_bounded::Delay::tokio(Duration::from_secs(10)),
96+
10,
97+
),
9598
queued_streams: VecDeque::default(),
9699
}
97100
}

protocols/autonat/src/v2/server/handler/dial_back.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl Handler {
3333
Self {
3434
pending_nonce: Some(cmd),
3535
requested_substream_nonce: None,
36-
outbound: FuturesSet::new(Duration::from_secs(10), 5),
36+
outbound: FuturesSet::new(|| futures_bounded::Delay::tokio(Duration::from_secs(10)), 5),
3737
}
3838
}
3939
}

protocols/autonat/src/v2/server/handler/dial_request.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ where
6464
observed_multiaddr,
6565
dial_back_cmd_sender,
6666
dial_back_cmd_receiver,
67-
inbound: FuturesSet::new(Duration::from_secs(10), 10),
67+
inbound: FuturesSet::new(
68+
|| futures_bounded::Delay::tokio(Duration::from_secs(10)),
69+
10,
70+
),
6871
rng,
6972
}
7073
}

protocols/dcutr/src/handler/relayed.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,14 @@ impl Handler {
8787
Self {
8888
endpoint,
8989
queued_events: Default::default(),
90-
inbound_stream: futures_bounded::FuturesSet::new(Duration::from_secs(10), 1),
91-
outbound_stream: futures_bounded::FuturesSet::new(Duration::from_secs(10), 1),
90+
inbound_stream: futures_bounded::FuturesSet::new(
91+
|| futures_bounded::Delay::tokio(Duration::from_secs(10)),
92+
1,
93+
),
94+
outbound_stream: futures_bounded::FuturesSet::new(
95+
|| futures_bounded::Delay::tokio(Duration::from_secs(10)),
96+
1,
97+
),
9298
holepunch_candidates,
9399
attempts: 0,
94100
}

protocols/identify/src/handler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ impl Handler {
139139
remote_peer_id,
140140
events: SmallVec::new(),
141141
active_streams: futures_bounded::FuturesSet::new(
142-
STREAM_TIMEOUT,
142+
move || futures_bounded::Delay::tokio(STREAM_TIMEOUT),
143143
MAX_CONCURRENT_STREAMS_PER_CONNECTION,
144144
),
145145
trigger_next_identify: Delay::new(Duration::ZERO),

protocols/kad/src/handler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ impl Handler {
463463
next_connec_unique_id: UniqueConnecId(0),
464464
inbound_substreams: Default::default(),
465465
outbound_substreams: futures_bounded::FuturesTupleSet::new(
466-
substreams_timeout,
466+
move || futures_bounded::Delay::tokio(substreams_timeout),
467467
MAX_NUM_STREAMS,
468468
),
469469
pending_streams: Default::default(),

protocols/perf/src/server/handler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ impl Handler {
4949
pub fn new() -> Self {
5050
Self {
5151
inbound: futures_bounded::FuturesSet::new(
52-
crate::RUN_TIMEOUT,
52+
move || futures_bounded::Delay::tokio(crate::RUN_TIMEOUT),
5353
crate::MAX_PARALLEL_RUNS_PER_CONNECTION,
5454
),
5555
}

0 commit comments

Comments
 (0)