RFR: 8208693: HttpClient: Extend the request timeout's scope to cover the response body [v2]
Volkan Yazici
vyazici at openjdk.org
Fri Oct 24 13:26:25 UTC 2025
On Wed, 22 Oct 2025 12:30:59 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Move `preTerminationCallback` to `complete()`
>
> src/java.net.http/share/classes/jdk/internal/net/http/common/HttpBodySubscriberWrapper.java line 412:
>
>> 410: if (preTerminationCallback != null) {
>> 411: preTerminationCallback.run();
>> 412: }
>
> Did you consider adding this to complete() instead? There would then be a single place where this code would appear.
This not just simplifies the code, but also corrects it! `preTerminationCallback` should be called once. Implemented as suggested in bcd5bcc8a58.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27469#discussion_r2460440877
More information about the net-dev
mailing list