Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8218626

LdapContext#reconnect() leads to a memory leak and open network connect

XMLWordPrintable

      A DESCRIPTION OF THE PROBLEM :
      With the commit http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/021b47694183 the behavior of the method LdapCtx#reconnect() has changed. Previously, a call to LdapCtx#reconnect did not affect the current LdapClient. The change made in this commit creates a new LdapClient each time LdapCtx#reconnect is called. Because of the worker thread of the LDAP connection the former LdapClient remains alive and will never garbage collected.

      If I understand the code correctly, the former LdapClient should be closed in LdapCtx#connect(boolean) by calling closeConnection(false) when we try to reconnect.

      REGRESSION : Last worked in version 8u201


      FREQUENCY : always


            psonal Pallavi Sonal (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: