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

Support connect_timeout keyword arg in TCPSocket #3424

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

rwstauner
Copy link
Collaborator

Accept the connect_timeout keyword argument to TCPSocket.new
and wrap the connect call with Timeout.timeout when provided.

closes #3421

Copy link

Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
The following contributors of this PR have not signed the OCA:

To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application.

When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated.

If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Required At least one contributor does not have an approved Oracle Contributor Agreement. label Jan 31, 2024
@eregon
Copy link
Member

eregon commented Feb 1, 2024

(I'm asking to add both to the existing Shopify OCA)

Copy link
Member

@eregon eregon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks great, thank you.
Just one comment.

Copy link

Thank you for signing the OCA.

@oracle-contributor-agreement oracle-contributor-agreement bot added OCA Verified All contributors have signed the Oracle Contributor Agreement. and removed OCA Required At least one contributor does not have an approved Oracle Contributor Agreement. labels Feb 1, 2024
Co-authored-by: Manef Zahra <manef.zahra@shopify.com>
Co-authored-by: Patrick Lin <patrick.lin@shopify.com>
Co-authored-by: Kevin Menard <kevin.menard@shopify.com>
Co-authored-by: Randy Stauner <randy.stauner@shopify.com>

closes oracle#3421
@andrykonchin andrykonchin added the in-ci The PR is being tested in CI. Do not push new commits. label Feb 2, 2024
@graalvmbot graalvmbot merged commit 577c1dd into oracle:master Feb 6, 2024
1 check passed
@eregon
Copy link
Member

eregon commented Feb 13, 2024

I am not sure why, but tests/specs related to connect_timeout fail transiently quite frequently.
e.g.:

1)
TCPSocket#initialize raises IO::TimeoutError with :connect_timeout when no server is listening on the given address ERROR
IO::TimeoutError: execution expired
/b/b/e/main/spec/ruby/library/socket/tcpsocket/shared/new.rb:30:in `block (3 levels) in <top (required)>'
/b/b/e/main/spec/ruby/library/socket/tcpsocket/initialize_spec.rb:5:in `<top (required)>'

Also one of the MRI tests.

@rwstauner rwstauner deleted the hdays-timeout branch February 14, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-ci The PR is being tested in CI. Do not push new commits. OCA Verified All contributors have signed the Oracle Contributor Agreement. shopify
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dalli requires support for the connect_timeout option to TCPSocket#initialize
6 participants