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

basichost: prevent duplicate dials #2196

Merged
merged 1 commit into from
Mar 17, 2023
Merged

Conversation

marten-seemann
Copy link
Contributor

Fixes #2195.

This fix is not perfect. The error returned will be a network.ErrNoConn. Ideally, the swarm would not count a connection as "fully connected" before opening the first stream (and receiving something from the peer) succeeds. This will also be necessary when we implement 0-RTT.

@MarcoPolo
Copy link
Collaborator

We should catch the errnocon error and return a better error

@marten-seemann marten-seemann merged commit 0d7e852 into master Mar 17, 2023
dennis-tra added a commit to dennis-tra/go-libp2p that referenced this pull request Jun 16, 2023
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.

basic host / swarm: duplicate dials when the handshake fails
2 participants