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

swarm: Provide peer_id to inject_dial_failure on connection limit error #2928

Merged
merged 4 commits into from
Sep 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@

- Update to [`libp2p-noise` `v0.39.1`](transports/noise/CHANGELOG.md#0391).

- Update to [`libp2p-swarm` `v0.39.1`](swarm/CHANGELOG.md#0391).

# 0.48.0

- Update to [`libp2p-core` `v0.36.0`](core/CHANGELOG.md#0360).
Expand Down
5 changes: 5 additions & 0 deletions swarm/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

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

- Pass actual `PeerId` of dial to `NetworkBehaviour::inject_dial_failure` on `DialError::ConnectionLimit`. See [PR 2928].

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


# 0.39.0

- Remove deprecated `NetworkBehaviourEventProcess`. See [libp2p-swarm v0.38.0 changelog entry] for
Expand Down
2 changes: 1 addition & 1 deletion swarm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ where
Ok(_connection_id) => Ok(()),
Err((connection_limit, handler)) => {
let error = DialError::ConnectionLimit(connection_limit);
self.behaviour.inject_dial_failure(None, handler, &error);
self.behaviour.inject_dial_failure(peer_id, handler, &error);
Err(error)
}
}
Expand Down