Skip to content

fix(relay): remove external addr if there is no replacement reservation#6285

Open
dariusc93 wants to merge 3 commits intolibp2p:masterfrom
dariusc93:fix/remove-ext-addr-relay
Open

fix(relay): remove external addr if there is no replacement reservation#6285
dariusc93 wants to merge 3 commits intolibp2p:masterfrom
dariusc93:fix/remove-ext-addr-relay

Conversation

@dariusc93
Copy link
Member

Description

When the local node has an active reservation with a relay, it notifies swarm of the new external address. When calling Swarm::remove_listener on a listener with an active relay reservation, the address would still persist as an external address despite the local node not considered listening on the relay. This PR changes it so the when the node stops listening on the relay, it removes the external address if there is no other reservation to replace it.

resolves #6165.

Notes & open questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

@dariusc93 dariusc93 changed the title fix: remove external address when there is no replacement reservation fix(relay): remove external address when there is no replacement reservation Mar 6, 2026
@dariusc93 dariusc93 changed the title fix(relay): remove external address when there is no replacement reservation fix(relay): remove external addr if there is no replacement reservation Mar 6, 2026
@dariusc93 dariusc93 requested review from elenaf9 and jxs March 6, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

relay: external address not removed upon listener being closed

1 participant