Details
-
Bug
-
Resolution: Fixed
-
P2
-
9
-
b166
-
Verified
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8179151 | 10 | Daniel Fuchs | P2 | Resolved | Fixed | b06 |
Description
When sending an HttpRequest created with a very small duration timeout (e.g. 1ms), the timeout may not be honored. This is due to some race conditions between the code that calls cancel(HttpTimeoutException) and the code that establishes the exchange for the request or creates the CompletableFeature<> for the response. If the cancel() method is raised before the exchange impl is established or before the completable feature is created then the cancellation caused by the timeout may go unnoticed. In some cases - e.g. when the remote party doesn't reply, it can cause the client to hang forever waiting for the response even though a timeout was specified.
Attachments
Issue Links
- backported by
-
JDK-8179151 Race conditions in timeout handling code in http/2 incubator client
- Resolved
- duplicates
-
JDK-8170940 test/java/net/httpclient/TimeoutOrdering.java failing intermittently
- Resolved