Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

identify: Fix IdentifyWait when Connected events happen out of order #2173

Merged
merged 4 commits into from
Mar 7, 2023

Conversation

MarcoPolo
Copy link
Collaborator

fixes #2163

Adds an IsClosed method to network.Conn

@MarcoPolo MarcoPolo marked this pull request as ready for review March 6, 2023 20:32
Copy link
Contributor

@marten-seemann marten-seemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it guaranteed that Closed will return true before any of the notifications will be sent?

@marten-seemann marten-seemann changed the title id: Fix IdentifyWait when Connected events happen out of order identify: Fix IdentifyWait when Connected events happen out of order Mar 7, 2023
@MarcoPolo
Copy link
Collaborator Author

This fixes a lot of the flakiness in the autorelay tests. I'm having a much harder time reproducing some earlier flakes. Thanks @sukunrt :)

@MarcoPolo MarcoPolo merged commit 5330570 into master Mar 7, 2023
@marten-seemann
Copy link
Contributor

Woohoo, this is great! Fewer flaky tests!

sukunrt added a commit to sukunrt/go-libp2p that referenced this pull request Mar 9, 2023
libp2p#2173 removed the requirement
that swarm notifies identify before any new streams are started on a
connection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

holepunch: race condition with identifyWait
2 participants