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: rendezvous identify example #5496

Merged
merged 5 commits into from
Jul 16, 2024
Merged
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
4 changes: 4 additions & 0 deletions examples/rendezvous/src/bin/rzv-identify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,12 @@ async fn main() {
}
// once `/identify` did its job, we know our external address and can register
SwarmEvent::Behaviour(MyBehaviourEvent::Identify(identify::Event::Received {
info,
..
})) => {
// Register our external address. Needs to be done explicitly
// for this case, as it's a local address.
swarm.add_external_address(info.observed_addr);
if let Err(error) = swarm.behaviour_mut().rendezvous.register(
rendezvous::Namespace::from_static("rendezvous"),
rendezvous_point,
Expand Down
Loading