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 TCP connection timeout #179

Merged
merged 1 commit into from
Jan 24, 2024
Merged

Fix TCP connection timeout #179

merged 1 commit into from
Jan 24, 2024

Conversation

sosthene-nitrokey
Copy link
Contributor

Ureq does not use the timeout for the opening of the TCP connection, and instead uses the default timeout of 30s.

See algesten/ureq#595 (comment)

@ansiwen
Copy link
Collaborator

ansiwen commented Jan 23, 2024

In general it would be useful to also write what and why you do something in the change, not only giving the undelivered motivation. I can’t easily understand, why you set the connect timeout to 10 here, and how is the behavior before and after.

@sosthene-nitrokey
Copy link
Contributor Author

sosthene-nitrokey commented Jan 23, 2024

There is a bug in ureq that cause the call to connect to always use the connect_timeout value, even when there is a custom timeout value. connect_timeout has a default of 30s, so this overrides it with the value for the global request timeout, so that we have the behaviour we expect.

@sosthene-nitrokey sosthene-nitrokey merged commit 07d4dbb into main Jan 24, 2024
3 checks passed
@sosthene-nitrokey sosthene-nitrokey deleted the timeout-connect branch January 24, 2024 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants