RFR: 8371903: HttpClient: improve handling of HTTP/2 GOAWAY frames with error code [v2]
EunHyunsu
duke at openjdk.org
Wed Dec 10 14:14:05 UTC 2025
On Wed, 10 Dec 2025 13:43:18 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:
>> @djelinski Fixed the intermittent test failures:
>> - Removed `close()` call after GOAWAY to avoid connection reset errors
>> - Server now relies on Http2TestServer for connection cleanup
>> - Tested 10 times locally, all passed
>>
>> Should be stable now. Please review when you get a chance
>
> @ehs208 thanks for that, the test looks stable now.
>
> Looking at the test logs, I realized why the `goAwaySentLatch.await` was where you originally had it; now that it's after all 3 requests, the requests are sent on 3 distinct connections, which is not what we want. Please move it back to its original position (after sending first request). Sorry for my confusion.
@djelinski I moved the goAwaySentLatch.await() back to its original position (after the first request, before second/third).
However, after testing locally, I'm seeing the same behavior - all 3 requests create separate connections. I believe this is expected because:
1. First request uses connection 1
2. Server sends GOAWAY, connection 1 receives it
3. Second and third requests are retried on new connections (2 and 3)
Since requests 2 and 3 are retries after GOAWAY, they naturally go to new connections. The await position doesn't change this - it just controls when the retries are sent.
Could you clarify what connection behavior you're expecting? The test is passing and correctly verifies that:
- Exactly 1 request fails with GOAWAY error details
- Exactly 2 requests succeed after retry
Let me know if I'm missing something!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28632#issuecomment-3637270759
More information about the net-dev
mailing list