rust-libp2p
rust-libp2p copied to clipboard
UPnP port mappings should be deleted on graceful shutdown
Description
UPnP port mappings should be deleted on graceful shutdown.
Motivation
The lease time for opened UPnP port mappings is quite long. It would be decent to remove any created port mappings on shutdown.
Current Implementation
On shutdown, port mappings just stay alive until the lease time is up.
Are you planning to do it yourself in a pull request ?
No
Hi, this is quite complex and complicated to achieve without async Drop¹.
That's why also we introduced the TTL, so that mappings are not permanent. Can't you remove the listener and wait for the ExpiredListenAddr event on your application? It will trigger the removal of the upnp mappings