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

WebRequest hard timeout #344

Open
cdalexndr opened this issue Apr 23, 2021 · 0 comments · May be fixed by #345
Open

WebRequest hard timeout #344

cdalexndr opened this issue Apr 23, 2021 · 0 comments · May be fixed by #345

Comments

@cdalexndr
Copy link
Contributor

cdalexndr commented Apr 23, 2021

Currently, setting timeout is unreliable, the whole request time could exceed the set timeout (connect, redirects, etc all using same timeout value).

A method for setting hard request timeout should be provided, so that a request can be reliably terminated in a timeout window.

Example implementation: https://www.baeldung.com/httpclient-timeout#hard_timeout
Note that the above implementation example is for a single request. Each redirect request will reduce the available timeout for that request so that all requests are completed/terminated in the set timeout.

P.S.: after this feature, the original timeout value could be split into connection and socket timeouts to reflect actual usage.

@cdalexndr cdalexndr linked a pull request Apr 23, 2021 that will close this issue
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 a pull request may close this issue.

1 participant