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

HttpClient TimeoutException message reports transient values #6382

Closed
mike-strauch opened this issue Jun 9, 2021 · 0 comments · Fixed by #6388 or #6453
Closed

HttpClient TimeoutException message reports transient values #6382

mike-strauch opened this issue Jun 9, 2021 · 0 comments · Fixed by #6388 or #6453
Labels
Bug For general bugs on Jetty side

Comments

@mike-strauch
Copy link

Jetty version(s)
9.4.42

Java version/vendor (use: java -version)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.7+8-LTS, mixed mode)

OS type/version
OSX 10.15.4

Description
When using the HttpClient to make asynchronous requests with a specific timeout, if the request has follow redirects enabled and the request ends up timing out; the error reported includes a timeout value that is different from the one specified on the request itself. This did not happen in older versions of Jetty. Example, you set a timeout of 5000ms on a request that ends up getting redirected and ultimately times out. The error message you'll receive will look like:

Total timeout 3808 ms elapsed

rather than:

Total timeout 5000 ms elapsed

How to reproduce?
You can run the test classes attached to #6323 and add a call to result.getFailure().getMessage() in the onComplete() handler near the bottom of the test class.

@mike-strauch mike-strauch added the Bug For general bugs on Jetty side label Jun 9, 2021
@sbordet sbordet changed the title Timeouts that occur when multiple requests are made using HttpClient report inconsistent timeout values HttpClient TimeoutException message reports transient values Jun 10, 2021
sbordet added a commit that referenced this issue Jun 10, 2021
…alues.

Now using consistently HttpConversation.getTimeout() to report the accurate value.

Signed-off-by: Simone Bordet <[email protected]>
sbordet added a commit that referenced this issue Jun 21, 2021
…alues.

Now using consistently HttpConversation.getTimeout() to report the accurate value.

Signed-off-by: Simone Bordet <[email protected]>
sbordet added a commit that referenced this issue Jun 21, 2021
…alues.

Now using consistently HttpConversation.getTimeout() to report the accurate value.

Signed-off-by: Simone Bordet <[email protected]>
(cherry picked from commit 734d3b6)
sbordet added a commit that referenced this issue Jun 21, 2021
…alues.

Now using consistently HttpConversation.getTimeout() to report the accurate value.

Signed-off-by: Simone Bordet <[email protected]>
(cherry picked from commit 734d3b6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
None yet
1 participant