There is race condition between closing a connection and asynchronous results being returned.
LDAPConnection.setClosed will cancel the timer if one exists.
But AsyncRequestID.setResult will call getTimer which will potentially create a new timer thread.
If the async result returns while the connection is in the process of closing (or has just closed) then it will create a new timer that never gets cleaned up, and leaks a thread.
I think there might be a need for getTimer to return null if the connection internals are already closed, and for AsyncRequestID to handle that null case.