directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject sockets left established in connection.unBind() ?
Date Thu, 19 Sep 2013 22:03:39 GMT
Using Api version M20.  We create connection like this:

LdapConnection connection = new LdapNetworkConnection(config);
// Bind request settings
BindResponse bindResponse = connection.bind(bindRequest);

After connection.bind() 5 sockets are created.
One between the JVM and the remote ApacheDS host and 4 loopback sockets.

If I call connection.close(); all 5 are cleaned up.

If I call connection.unBind();

The remote socket closes but the 4 loopback sockets remain open and do not close.
After a while, the JVM runs out of sockets.

The literature says if unbind()  is call explicitly we don't have to close().

I want to close everything in the most graceful and orderly way.

Right now I've changed the code to call both methods


Should I need to do this or should I just call close() ? Thanks.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message