vt-middleware / ldaptive

A simple, extensible Java API for interacting with LDAP servers
56 stars 26 forks source link

Auto reconnect fails for DefaultConnectionFactory #187

Closed dfish3r closed 3 years ago

dfish3r commented 3 years ago

The default behavior for connections is to attempt auto reconnection when an unexpected close occurs. For connection factories that shutdown thread pools, like DefaultConnectionFactory, auto reconnect will fail because the thread pool is closed. This doesn't tend to matter since DefaultConnectionFactory closes the connection when the operation is complete, so connections are short lived.

Add a check to prevent auto reconnect in this scenario.