libp2p / go-libp2p

libp2p implementation in Go
MIT License
6.1k stars 1.07k forks source link

relay: make only 1 reservation per peer #2974

Closed sukunrt closed 1 month ago

sukunrt commented 1 month ago

We only need 1 reservation per peer.

This PR also proactively removes relay reservations on disconnecting from the peer. This helps when the relay client is restarting frequently.

Fixes: https://github.com/libp2p/go-libp2p/issues/2963