mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-29 02:31:20 +00:00
feat(gossipsub): deprecate Config::idle_timeout
Deprecate the `Config::idle_timeout` function in preparation for removing the `KeepAlive::Until` entirely. Related: #3844. Pull-Request: #4648.
This commit is contained in:
parent
4686ce8e66
commit
15ad4ea1d1
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -2581,7 +2581,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libp2p-gossipsub"
|
name = "libp2p-gossipsub"
|
||||||
version = "0.45.1"
|
version = "0.45.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-std",
|
"async-std",
|
||||||
"asynchronous-codec",
|
"asynchronous-codec",
|
||||||
|
@ -81,7 +81,7 @@ libp2p-dcutr = { version = "0.10.0", path = "protocols/dcutr" }
|
|||||||
libp2p-deflate = { version = "0.40.1", path = "transports/deflate" }
|
libp2p-deflate = { version = "0.40.1", path = "transports/deflate" }
|
||||||
libp2p-dns = { version = "0.40.1", path = "transports/dns" }
|
libp2p-dns = { version = "0.40.1", path = "transports/dns" }
|
||||||
libp2p-floodsub = { version = "0.43.0", path = "protocols/floodsub" }
|
libp2p-floodsub = { version = "0.43.0", path = "protocols/floodsub" }
|
||||||
libp2p-gossipsub = { version = "0.45.1", path = "protocols/gossipsub" }
|
libp2p-gossipsub = { version = "0.45.2", path = "protocols/gossipsub" }
|
||||||
libp2p-identify = { version = "0.43.1", path = "protocols/identify" }
|
libp2p-identify = { version = "0.43.1", path = "protocols/identify" }
|
||||||
libp2p-identity = { version = "0.2.5" }
|
libp2p-identity = { version = "0.2.5" }
|
||||||
libp2p-kad = { version = "0.44.6", path = "protocols/kad" }
|
libp2p-kad = { version = "0.44.6", path = "protocols/kad" }
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
## 0.45.2 - unreleased
|
||||||
|
|
||||||
|
- Deprecate `gossipsub::Config::idle_timeout` in favor of `SwarmBuilder::idle_connection_timeout`.
|
||||||
|
See [PR 4648].
|
||||||
|
|
||||||
|
[PR 4648]: (https://github.com/libp2p/rust-libp2p/pull/4648)
|
||||||
|
|
||||||
## 0.45.1
|
## 0.45.1
|
||||||
|
|
||||||
- Add getter function to obtain `TopicScoreParams`.
|
- Add getter function to obtain `TopicScoreParams`.
|
||||||
|
@ -3,7 +3,7 @@ name = "libp2p-gossipsub"
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = { workspace = true }
|
rust-version = { workspace = true }
|
||||||
description = "Gossipsub protocol for libp2p"
|
description = "Gossipsub protocol for libp2p"
|
||||||
version = "0.45.1"
|
version = "0.45.2"
|
||||||
authors = ["Age Manning <Age@AgeManning.com>"]
|
authors = ["Age Manning <Age@AgeManning.com>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://github.com/libp2p/rust-libp2p"
|
repository = "https://github.com/libp2p/rust-libp2p"
|
||||||
|
@ -3305,6 +3305,7 @@ where
|
|||||||
type ConnectionHandler = Handler;
|
type ConnectionHandler = Handler;
|
||||||
type ToSwarm = Event;
|
type ToSwarm = Event;
|
||||||
|
|
||||||
|
#[allow(deprecated)]
|
||||||
fn handle_established_inbound_connection(
|
fn handle_established_inbound_connection(
|
||||||
&mut self,
|
&mut self,
|
||||||
_: ConnectionId,
|
_: ConnectionId,
|
||||||
@ -3318,6 +3319,7 @@ where
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(deprecated)]
|
||||||
fn handle_established_outbound_connection(
|
fn handle_established_outbound_connection(
|
||||||
&mut self,
|
&mut self,
|
||||||
_: ConnectionId,
|
_: ConnectionId,
|
||||||
|
@ -186,6 +186,9 @@ impl Config {
|
|||||||
/// The time a connection is maintained to a peer without being in the mesh and without
|
/// The time a connection is maintained to a peer without being in the mesh and without
|
||||||
/// send/receiving a message from. Connections that idle beyond this timeout are disconnected.
|
/// send/receiving a message from. Connections that idle beyond this timeout are disconnected.
|
||||||
/// Default is 120 seconds.
|
/// Default is 120 seconds.
|
||||||
|
#[deprecated(
|
||||||
|
note = "Set a global idle connection timeout via `SwarmBuilder::idle_connection_timeout` instead."
|
||||||
|
)]
|
||||||
pub fn idle_timeout(&self) -> Duration {
|
pub fn idle_timeout(&self) -> Duration {
|
||||||
self.idle_timeout
|
self.idle_timeout
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user