Skip to content

Fix TcpStream::connect_timeout on linux #45269

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

Merged
merged 1 commit into from
Oct 15, 2017

Conversation

sfackler
Copy link
Member

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 #45265.

r? @alexcrichton

@sfackler sfackler added beta-nominated Nominated for backporting to the compiler in the beta channel. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Oct 14, 2017
@sfackler sfackler force-pushed the connect-timeout-fix branch from 53fedf2 to 2bd5238 Compare October 14, 2017 02:37
@kennytm kennytm added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 14, 2017
@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Collaborator

bors commented Oct 14, 2017

📌 Commit 2bd5238 has been approved by alexcrichton

@alexcrichton alexcrichton added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Oct 14, 2017
@kennytm kennytm added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 14, 2017
kennytm added a commit to kennytm/rust that referenced this pull request 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
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.
@sfackler sfackler force-pushed the connect-timeout-fix branch from 2bd5238 to cab99a3 Compare October 14, 2017 20:56
@sfackler
Copy link
Member Author

@bors r=alexcrichton

@bors
Copy link
Collaborator

bors commented Oct 14, 2017

📌 Commit cab99a3 has been approved by alexcrichton

bors added a commit that referenced this pull request Oct 14, 2017
Rollup of 9 pull requests

- Successful merges: #45113, #45250, #45255, #45258, #45263, #45264, #45269, #45280, #45289
- Failed merges:
kennytm added a commit to kennytm/rust that referenced this pull request 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
bors added a commit that referenced this pull request Oct 15, 2017
Rollup of 9 pull requests

- Successful merges: #45113, #45250, #45255, #45258, #45263, #45264, #45269, #45280, #45289
- Failed merges:
@bors bors merged commit cab99a3 into rust-lang:master Oct 15, 2017
@sfackler sfackler deleted the connect-timeout-fix branch October 31, 2017 20:08
@alexcrichton alexcrichton removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Oct 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants