vt-middleware / ldaptive

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

Fix potential long waits on checkout. #218

Closed dfish3r closed 2 years ago

dfish3r commented 2 years ago

If connection creation is timing out, this can cause threads waiting on the checkOutLock to block. Enforce the blockWaitTime on the checkOutLock so that each thread does not have to wait in turn for connection creation to time out. Improve the grow method which could potentially cause the pool to exceed it's max size by acquiring the checkOutLock. Note that this could only occur when the pool is below it's min size and min and max sizes are the same.