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

Conversation

Projects
None yet
3 participants
@etehtsea
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.

@eregon

This comment has been minimized.

Show comment
Hide comment
@eregon

eregon Aug 10, 2016

Member

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

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

This comment has been minimized.

Show comment
Hide comment
@etehtsea
Contributor

etehtsea commented Aug 10, 2016

Fix Socket.tcp connect_timeout option
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.

@enebo enebo merged commit 8fddbaf into jruby:master Aug 11, 2016

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