Skip to content

Commit

Permalink
apply suggested fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
leonzchang committed Oct 18, 2023
1 parent 8e7a425 commit f6fce0b
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ libp2p-floodsub = { version = "0.43.0", path = "protocols/floodsub" }
libp2p-gossipsub = { version = "0.45.2", path = "protocols/gossipsub" }
libp2p-identify = { version = "0.43.1", path = "protocols/identify" }
libp2p-identity = { version = "0.2.5" }
libp2p-kad = { version = "0.44.7", path = "protocols/kad" }
libp2p-kad = { version = "0.44.6", path = "protocols/kad" }
libp2p-mdns = { version = "0.44.0", path = "protocols/mdns" }
libp2p-memory-connection-limits = { version = "0.1.0", path = "misc/memory-connection-limits" }
libp2p-metrics = { version = "0.13.1", path = "misc/metrics" }
Expand Down
2 changes: 0 additions & 2 deletions protocols/kad/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
## 0.44.7 - unreleased

## 0.44.6 - unreleased

- Rename `Kademlia` symbols to follow naming convention.
Expand Down
2 changes: 1 addition & 1 deletion protocols/kad/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "libp2p-kad"
edition = "2021"
rust-version = { workspace = true }
description = "Kademlia protocol for libp2p"
version = "0.44.7"
version = "0.44.6"
authors = ["Parity Technologies <[email protected]>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand Down
2 changes: 1 addition & 1 deletion protocols/kad/src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ impl ConnectionHandler for Handler {
}

fn connection_keep_alive(&self) -> KeepAlive {
KeepAlive::No
self.keep_alive
}

fn poll(
Expand Down
1 change: 0 additions & 1 deletion protocols/relay/src/behaviour/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,6 @@ impl ConnectionHandler for Handler {
&& self.circuit_accept_futures.is_empty()
&& self.circuit_deny_futures.is_empty()
&& self.circuits.is_empty()
&& self.active_reservation.is_none()
{
#[allow(deprecated)]
match self.keep_alive {
Expand Down
3 changes: 1 addition & 2 deletions protocols/relay/src/priv_client/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,7 @@ impl ConnectionHandler for Handler {
if matches!(self.reservation, Reservation::None) {
match self.keep_alive {
KeepAlive::Yes => {
self.keep_alive =
KeepAlive::Until(Instant::now() + Duration::from_secs(10));
self.keep_alive = KeepAlive::Until(Instant::now() + Duration::from_secs(10));
}
KeepAlive::Until(_) => {}
KeepAlive::No => panic!("Handler never sets KeepAlive::No."),
Expand Down

0 comments on commit f6fce0b

Please sign in to comment.