-
Notifications
You must be signed in to change notification settings - Fork 66
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
TcpBuilder::connect should use SocketAddr instead of ToSocketAddrs. #45
Comments
Hm yeah with |
Currently the internal socket is consumed and converted to a I was mostly concerned with different thing, i.e., exposing an API that uses |
I suppose if we could go back I'd want to rethink a good portion of this crate. I feel like |
net2 is deprecated and under sustaining maintenance now, accepting only bugfixes and patches to enable new rust platforms. |
If ToSocketAddrs are resolved to multiple addresses, then in case of failure
connect will be used multiple times with the same socket. This is incorrect.
After first failed connect the state of socket is unspecified and socket should
not be reused.
Additionally, if socket is in non-blocking mode, then the connect can return
EINPROGRESS. Connection will not be aborted, and further calls to connect will
fail with EALREADY, because connection request is already in progress.
The text was updated successfully, but these errors were encountered: