Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ping): Fix panic in WASM caused by retrying on dial upgrade errors #5447

Merged
merged 11 commits into from
Jun 10, 2024
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 @@ -93,7 +93,7 @@ libp2p-mplex = { version = "0.41.0", path = "muxers/mplex" }
libp2p-muxer-test-harness = { path = "muxers/test-harness" }
libp2p-noise = { version = "0.44.0", path = "transports/noise" }
libp2p-perf = { version = "0.3.0", path = "protocols/perf" }
libp2p-ping = { version = "0.44.1", path = "protocols/ping" }
libp2p-ping = { version = "0.44.2", path = "protocols/ping" }
libp2p-plaintext = { version = "0.41.0", path = "transports/plaintext" }
libp2p-pnet = { version = "0.24.0", path = "transports/pnet" }
libp2p-quic = { version = "0.10.3", path = "transports/quic" }
Expand Down
8 changes: 7 additions & 1 deletion protocols/ping/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
## 0.44.1 - unreleased
## 0.44.2

- Fixes panic in WASM caused by retrying on dail errors.
See [PR 5447](https://github.com/libp2p/rust-libp2p/pull/5447).
oblique marked this conversation as resolved.
Show resolved Hide resolved

## 0.44.1

- Impose `Sync` on `ping::Failure::Other`.
`ping::Event` can now be shared between threads.
See [PR 5250]


[PR 5250]: https://github.com/libp2p/rust-libp2p/pull/5250

## 0.44.0
Expand Down
2 changes: 1 addition & 1 deletion protocols/ping/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "libp2p-ping"
edition = "2021"
rust-version = { workspace = true }
description = "Ping protocol for libp2p"
version = "0.44.1"
version = "0.44.2"
authors = ["Parity Technologies <[email protected]>"]
license = "MIT"
repository = "https://github.com/libp2p/rust-libp2p"
Expand Down
1 change: 1 addition & 0 deletions protocols/ping/src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ impl Handler {
>,
) {
self.outbound = None; // Request a new substream on the next `poll`.
self.interval.reset(Duration::new(0, 0));
oblique marked this conversation as resolved.
Show resolved Hide resolved
jxs marked this conversation as resolved.
Show resolved Hide resolved

let error = match error {
StreamUpgradeError::NegotiationFailed => {
Expand Down
Loading