RFR: 8361249: PlainHttpConnection connection logic can be simplified [v3]

Jaikiran Pai jpai at openjdk.org
Mon Jul 7 07:07:39 UTC 2025


On Fri, 4 Jul 2025 08:34:52 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> The PlainHttpConnection::connectAsync method implements a retry logic that will call connect() again if connect() throws the first time. This will not work, as the channel is closed when connect() throws. That logic should be removed. Reconnection should only be attempted at a higher level (MultiExchange).
>
> Daniel Fuchs has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Review feedback

Hello Daniel, the changes look good to me. I went back and looked at the original issue where this code was introduced and you are right that this very likely wasn't necessary. The removal of the `ConnectionState` altogether, also makes this much more simpler.

-------------

Marked as reviewed by jpai (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/26087#pullrequestreview-2992441833


More information about the net-dev mailing list