-
Notifications
You must be signed in to change notification settings - Fork 13.4k
TcpStream::connect_timeout doesn't fail to connect to a nonexistent server on Linux #45265
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
Labels
O-linux
Operating system: Linux
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
Comments
Interestingly it does behave as expected on macOS. |
Works under WSL as well. Native linux it fails spectacularly. |
From an strace, it looks like Linux sets all of
|
Fix here: #45269 |
sfackler
added a commit
to sfackler/rust
that referenced
this issue
Oct 14, 2017
Linux appears to set POLLOUT when a conection's refused, which is pretty weird. Invert the check to look for an error explicitly. Also add an explict test for this case. Closes rust-lang#45265.
kennytm
added a commit
to kennytm/rust
that referenced
this issue
Oct 14, 2017
…xcrichton Fix TcpStream::connect_timeout on linux Linux appears to set POLLOUT when a conection's refused, which is pretty weird. Invert the check to look for an error explicitly. Also add an explict test for this case. Closes rust-lang#45265. r? @alexcrichton
sfackler
added a commit
to sfackler/rust
that referenced
this issue
Oct 14, 2017
Linux appears to set POLLOUT when a conection's refused, which is pretty weird. Invert the check to look for an error explicitly. Also add an explict test for this case. Closes rust-lang#45265.
kennytm
added a commit
to kennytm/rust
that referenced
this issue
Oct 15, 2017
…xcrichton Fix TcpStream::connect_timeout on linux Linux appears to set POLLOUT when a conection's refused, which is pretty weird. Invert the check to look for an error explicitly. Also add an explict test for this case. Closes rust-lang#45265. r? @alexcrichton
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
O-linux
Operating system: Linux
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
This program succeeds on Linux, even though it shouldn't (assuming you don't have a listener on 1234). Trying to do anything with the socket produces
Error { repr: Os { code: 107, message: "Transport endpoint is not connected" } }
.The text was updated successfully, but these errors were encountered: