JDK-8262027 : Improve how HttpConnection detects a closed channel when taking/returning a connection to the pool
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-02-19
  • Updated: 2024-07-14
  • Resolved: 2021-02-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17
17 b11Fixed
Related Reports
Relates :  
Relates :  
Description
There is a race condition when the server closes a connection at roughly the same time that the client takes it of the pool. This is particularly observable when the server/proxy closes the connection just after returning 401/407, but can also be observed in other circumstances. 
The detection of a channel state could be improved by attempting to read one character off the connection just after taking the connection off the pool.
Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/2649 Date: 2021-02-19 16:08:25 +0000
14-07-2024

Changeset: 0d2dbd29 Author: Daniel Fuchs <dfuchs@openjdk.org> Date: 2021-02-24 10:50:35 +0000 URL: https://git.openjdk.java.net/jdk/commit/0d2dbd29
24-02-2021