This is a fresh version of the PR that I had opened here https://github.com/openjdk/jdk/pull/20442. A `git merge` command ended up causing unexpected issues with that old PR.
The commits in this PR are the ones which were already reviewed and a new one which was done to implement Daniel's suggestion in the review. test repeat 50 of java/net/httpclient had passed without any issues for that old PR. But before integrating this PR, I will rerun all relevant tests again to be sure nothing unexpected shows up. Sorry that this has to be reviewed afresh. ------------- Commit messages: - also decrement streams to allow the HttpClient to close - Daniel's suggestion - call closeAsUnprocessed() from handleReset - simplify request approver test construct - no need to expect request path - move the unprocessed state tracking to ExchangeImpl - reorder setFinalStream and markHalfClosedRemote - simplify test, handle REFUSED_STREAM on the client side, fix WindowController assertion - add code comment to a test class - 8335181: Incorrect handling of HTTP/2 GOAWAY frames in HttpClient Changes: https://git.openjdk.org/jdk/pull/20567/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20567&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8335181 Stats: 615 lines in 12 files changed: 560 ins; 2 del; 53 mod Patch: https://git.openjdk.org/jdk/pull/20567.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/20567/head:pull/20567 PR: https://git.openjdk.org/jdk/pull/20567