On Thu, 12 Nov 2026 16:15:44 GMT, Roland Mesde <[email protected]> wrote:

>> src/java.net.http/share/classes/jdk/internal/net/http/Http2Connection.java 
>> line 957:
>> 
>>> 955:                         debug.log(() -> "Reset stream " + errorStream 
>>> + ": "
>>> 956:                                 + malformedFrame.getMessage());
>>> 957:                     stream.onProtocolError(new ProtocolException(
>> 
>> why did you replace `resetStream` with the `isTerminalState` / 
>> `onProtocolError` combo?
>
> @djelinski resetStream() alone would cancel the request with the server but 
> never report it to the caller, who would wait forever. onProtocolError() 
> cancels it and fails the caller's request with a ProtocolException. We also 
> don't cancel requests that have already finished or never started as 
> indicated in RFC 9113 (5.1, 6.4).

Interesting. Thanks for that. Now I wonder if our usages of resetStream in 
other places are correct. But that's out of scope for this PR.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/33824#discussion_r4553629718

Reply via email to