On Wed, 10 Dec 2025 14:35:29 GMT, Daniel Jeliński <[email protected]> wrote:
>> EunHyunsu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8371903: Move goAwaySentLatch.await() back to original position >> >> Move the await call to after the first request but before the second >> and third requests, ensuring only one initial connection is created >> and the other requests are properly retried. > > Right, we only create one connection initially, and requests 2 and 3 are > usually sent over the first connection before they are retried on new > connections. This can be observed in the server logs as `resetting stream 3 > as REFUSED_STREAM`. Ideally the server should not send anything after sending > the GOAWAY frame with error, but I think what we have is good enough, > @djelinski Oops, you're right! I moved `goAwaySentLatch.await()` back to its > original position and now it works as expected - only 1 connection is created > initially, and the other 2 are retries. Tested locally and all passed. FWIW - if the request succeeds (no exception thrown) you can check/assert whether two requests were sent on the same or different connections by comparing the value returned by `HttpResponse::connectionLabel()`; Though the result is an `Optional` our implementation will never return an empty optional. ------------- PR Comment: https://git.openjdk.org/jdk/pull/28632#issuecomment-3637968978
