rust-libp2p
rust-libp2p copied to clipboard
fix(identify): check actual port reuse instead of original intent
When PortUse::Reuse fails and falls back to ephemeral ports, detect this by comparing observed ports with listening ports rather than tracking the original PortUse intent.
Fixes #5820
Description
Notes & open questions
Change checklist
- [x] I have performed a self-review of my own code
- [ ] I have made corresponding changes to the documentation
- [x] 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