RFR: 8313657 : com.sun.jndi.ldap.Connection.cleanup does not close connections on SocketTimeoutErrors
Weibing Xiao
duke at openjdk.org
Fri Aug 4 13:07:03 UTC 2023
On Thu, 3 Aug 2023 17:59:10 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> com.sun.jndi.ldap.Connection::leanup does not close the underlying socket if the is an IOException generation when the output stream was flushing the buffer.
>>
>> Please refer to the bug https://bugs.openjdk.org/browse/JDK-8313657.
>
> src/java.naming/share/classes/com/sun/jndi/ldap/Connection.java line 658:
>
>> 656: unpauseReader();
>> 657: if (debug) {
>> 658: if (sock.isClosed()) {
>
> How is it possible for sock.close() to succeed but isClosed to return false?
It is an unreachable code and got removed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15143#discussion_r1283640395
More information about the core-libs-dev
mailing list