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

Async connect on windows hangs in case of failure #947

Closed
kristjanvalur opened this issue Apr 20, 2021 · 2 comments
Closed

Async connect on windows hangs in case of failure #947

kristjanvalur opened this issue Apr 20, 2021 · 2 comments

Comments

@kristjanvalur
Copy link
Contributor

The api uses un-supported patterns when performing non-blocking connect(), which causes Windows to hang.
see PR #930

@kristjanvalur
Copy link
Contributor Author

Clarification:
A non-blocking connect() call should not be simply "retried". Rather, if the error is EINPROGRESS, the success of the connect whould then be polled with a getsocopt(). The PR explains this in deail and how the approach (retry) which works in practice on linux is not the posix way, and definitely does not work on windows.

This is testable on windows but a bit tricky. The requirement is to have the connect fail, not by a connection refused, but by not getting any response. This is possible, for example, by unplugging the server for a short while.

Without the fix mentioned in the defect, a windows machine will be unable to either succeed of fail on windows, if the initial connect does not immediately succeed or fail.

A previous defect, #817 was closed, with reference to this PR and issue.

@kristjanvalur
Copy link
Contributor Author

PR #930 was closed, with the changes merged in pr #1073

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

No branches or pull requests

1 participant