Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(identify): always assert both identify responses
Previously, we used to race the two identify responses and assert the one that finished earlier. In practice, this didn't work but sometimes caused a timeout. See https://github.com/libp2p/rust-libp2p/actions/runs/4973490081/jobs/8899378998#step:7:98 for an example. Interestingly enough, refactoring this test to always assert both responses reveals a bug! The memory transport by default behaves like TCP and allocates a new ephemeral port for an outgoing connection. I believe this was never hit because the first swarm would always receive its response first and win the race. To assert this properly, we would have to implement port reuse for the memory transport which I think is unnecessary, hence I just commented out the assertion. Pull-Request: #3924.
- Loading branch information