Integrated: 8277969: HttpClient SelectorManager shuts down when custom Executor rejects a task
Daniel Fuchs
dfuchs at openjdk.java.net
Wed Apr 20 13:13:29 UTC 2022
On Mon, 24 Jan 2022 14:25:09 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
> These changes make sure that pending requests are terminated if the selector manager thread exits due to exceptions.
> This includes:
> 1. completing CompletableFutures that were returned to the caller code
> 2. cancelling requests that are in flight
> 3. calling onError on BodySubscribers that may not have been completed
> Note that step 3 is necessary as certain CompletableFutures, such as those returned by `BodySubscribers.ofInputStream`, complete immediately, the operation being eventually completed when the last bite of the response is read. Completing a completable future that is already completed has no effect, this case is handled by completing the BodySubscriber too.
This pull request has now been integrated.
Changeset: 5291ec8d
Author: Daniel Fuchs <dfuchs at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/5291ec8d56b0e89aa96c3d53d9dcf093480cf48f
Stats: 2001 lines in 24 files changed: 1733 ins; 139 del; 129 mod
8277969: HttpClient SelectorManager shuts down when custom Executor rejects a task
Reviewed-by: jpai, michaelm
-------------
PR: https://git.openjdk.java.net/jdk/pull/7196
More information about the net-dev
mailing list