RFR: 8293562: blocked threads with KeepAliveCache.get [v3]

Daniel Jeliński djelinski at openjdk.org
Wed Sep 28 15:36:08 UTC 2022


On Wed, 28 Sep 2022 14:01:18 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:
>> 
>>   Stop using getLocalhost
>
> src/java.base/share/classes/sun/net/www/http/KeepAliveCache.java line 275:
> 
>> 273:             }
>> 274:             // close connections outside cacheLock
>> 275:             if (closeList != null) {
> 
> Should we perhaps move this entire `if` block inside the `finally` just after the call to `cacheLock.unlock()`. That way even if there was any exception in that loop, then we wouldn't end up losing and thus leaking these unclosed sockets?

Good idea! Done.

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

PR: https://git.openjdk.org/jdk/pull/10401


More information about the net-dev mailing list