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.NewStream doesn't resolve DNS addresses #1302

Closed
Stebalien opened this issue Jan 19, 2022 · 0 comments · Fixed by #1342
Closed

BasicHost.NewStream doesn't resolve DNS addresses #1302

Stebalien opened this issue Jan 19, 2022 · 0 comments · Fixed by #1342

Comments

@Stebalien
Copy link
Member

While BasicHost.Connect will resolve DNS addresses, BasicHost.NewStream will try to establish a connection if one doesn't already exist, but it won't try to resolve DNS addresses.

The real issue here is that network.NewStream tries to automatically connect to a peer, but has no way to find/resolve addresses for that peer.

gammazero added a commit that referenced this issue Feb 22, 2022
BasicHost.NewStream will try to establish a connection if one doesn't already exist.  This will fail if the hosts addresses have not yet been resolved.  This PR resolves the hosts addresses before creating the stream and possible new connection.

Fixes #1302
marten-seemann pushed a commit that referenced this issue Mar 31, 2022
* Resolve addresses when creating a new stream

BasicHost.NewStream will try to establish a connection if one doesn't already exist.  This will fail if the hosts addresses have not yet been resolved.  This PR resolves the hosts addresses before creating the stream and possible new connection.

Fixes #1302

* Changes from review comments
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 a pull request may close this issue.

1 participant