[ruby] Default timeout to 60 seconds for the Typhoeus library
Merged
VO
14h ago+38+38+01234567890123456789-38-38-01234567890123456789
The Ruby client template defaults timeout to 60 seconds for Faraday (#10405) and HTTPX, but to 0 for Typhoeus, which libcurl reads as no limit.
This PR sets the Typhoeus default to 60 seconds and fixes the comment "Default to 0 (never times out)". To keep the old behavior, set config.timeout = 0.
PR checklist
- Read the contribution guidelines.
- Run the following to build the project and update samples:
(For Windows users, please run the script in WSL)./mvnw clean package || exit ./bin/generate-samples.sh ./bin/configs/*.yaml || exit ./bin/utils/export_docs_generators.sh || exit
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example./bin/generate-samples.sh bin/configs/java*.
IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed. - If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.
cc @cliffano @zlx @autopp
Summary by cubic
Sets the Typhoeus Ruby client default request timeout to 60 seconds so requests to a non-responsive server no longer hang indefinitely, matching the Faraday and HTTPX defaults. The old timeout = 0 value meant libcurl never timed out. To keep the previous behavior, set config.timeout = 0.