Skip to content

Commit

Permalink
fix(identify): always assert both identify responses
Browse files Browse the repository at this point in the history
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
thomaseizinger authored May 15, 2023
1 parent fd829ef commit 8c00dc9
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 8c00dc9

Please sign in to comment.