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

bug: apply request_timeout to timeout_connect #72

Merged
merged 6 commits into from
May 7, 2024

Conversation

mtopolnik
Copy link
Contributor

@mtopolnik mtopolnik commented May 6, 2024

ureq has a potential bug in its agent builder code regarding timeouts. There are two kinds of timeout:

  • agent_builder.timeout_connect() applies to establishing the TCP connection
  • agent_builder.timeout() applies to the overall HTTP request
  • timeout_connect is always applied for the connection phase, even if longer than the overall timeout
  • timeout_connect has a default of 15 seconds
  • it's impossible to revert timeout_connect to unconfigured state
  • therefore, any timeout setting shorter than timeout_connect is basically ignored

This PR applies a workaround and sets timeout_connect to QuestDB's parameter request_timeout.

This partially addresses questdb/py-questdb-client#75.

Also addresses #66.

@mtopolnik mtopolnik added bug Something isn't working documentation Improvements or additions to documentation labels May 6, 2024
@nwoolmer nwoolmer self-requested a review May 7, 2024 09:50
@mtopolnik mtopolnik changed the title bug: Apply request_timeout to timeout_connect bug: apply request_timeout to timeout_connect May 7, 2024
@bluestreak01 bluestreak01 merged commit a749ac3 into main May 7, 2024
11 checks passed
@bluestreak01 bluestreak01 deleted the mt_request_timeout branch May 7, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants