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

Fix Socket.tcp connect_timeout option #4061

Merged
merged 1 commit into from Aug 11, 2016
Merged

Conversation

@etehtsea
Copy link
Contributor

etehtsea commented Aug 10, 2016

Before commit Socket.tcp(host, port, connect_timeout: 0.1)
ignored timeout option. This happened because connect_internal
mistakenly responded with :wait_readable instead :wait_writable.
After fixing it this code started to constantly fail with timeout error.
Checking for OP_CONNECT in IO#wait_writable fixed this issue.

Added adopted spec from MRI, because it's excluded by other reasons.

@etehtsea etehtsea force-pushed the etehtsea:fix-connect-timeout branch 2 times, most recently from ad10c1b to f598ef8 Aug 10, 2016
@eregon
Copy link
Member

eregon commented Aug 10, 2016

Just curious, why did you close the spec and added a jruby-specific test instead?
The spec would benefit other Ruby implementations.

@etehtsea
Copy link
Contributor Author

etehtsea commented Aug 10, 2016

Before commit `Socket.tcp(host, port, connect_timeout: 0.1)`
ignored timeout option. This happened because `connect_internal`
mistakenly responded with `:wait_readable` instead of `:wait_writable`.
After fixing it this code started to constantly fail with timeout error.
Checking for OP_CONNECT in IO#wait_writable fixed this issue.
@etehtsea etehtsea force-pushed the etehtsea:fix-connect-timeout branch from f598ef8 to dcf4571 Aug 10, 2016
@enebo enebo merged commit 8fddbaf into jruby:master Aug 11, 2016
1 of 2 checks passed
1 of 2 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@enebo enebo added this to the JRuby 9.1.3.0 milestone Aug 11, 2016
@enebo enebo added the core label Aug 11, 2016
@etehtsea etehtsea deleted the etehtsea:fix-connect-timeout branch Aug 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.