RFR: 8304962: sun/net/www/http/KeepAliveCache/B5045306.java: java.lang.RuntimeException: Failed: Initial Keep Alive Connection is not being reused [v2]
Daniel Jeliński
djelinski at openjdk.org
Tue Mar 28 07:11:24 UTC 2023
On Tue, 28 Mar 2023 06:49:16 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
>> Daniel Jeliński has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add a comment about closing the strean
>
> test/jdk/sun/net/www/http/KeepAliveCache/B5045306.java line 203:
>
>> 201: trans.sendResponseHeaders(200, responseBody.length+1);
>> 202: OutputStream os = trans.getResponseBody();
>> 203: os.write(responseBody);
>
> Hello Daniel, with this change, the OutputStream will no longer be explicitly closed before the exchange `trans` is closed. But I think that should be OK, because looking at the original code before https://github.com/openjdk/jdk/commit/95ca94436d12974d98b1b999f9cc8408d64cbe3c, it too wasn't closing it explicitly, as far as I can see it. So, this looks fine to me.
Added a comment stating that we don't want to close the stream here.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13194#discussion_r1150117033
More information about the net-dev
mailing list