Skip to content

relay: external address not removed upon listener being closed #6165

@dariusc93

Description

@dariusc93

Summary

When a listener tied to a relay reservation is closed, swarm doesn't emit the event indicating that the listener is closed, however the external address still persist. This happens because there is nothing in the relay client to remove the external address after the relay is closed except for when the connection itself is closed.

if let Some((addr, ReservationStatus::Confirmed)) =
self.reservation_addresses.remove(&connection_id)
{
self.queued_actions
.push_back(ToSwarm::ExternalAddrExpired(addr));
}

Expected behavior

Remove external addresses after closing a listener tied to a relay

Actual behavior

Doesnt remove external addresses after closing a listener

Relevant log output

Possible Solution

When the transport closed the listener, we should also remove the external address as it would indicate that that the node is no longer reachable through the relay. Likely to be done by signaling the behaviour that the listener is closed and emit the event to remove the address.

Version

0.56

Would you like to work on fixing this bug?

Maybe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions