Menu

#23 Connections are never returned to the pool when maxIdle is set to any value

2.4
open
nobody
pool (1)
1
2013-11-20
2013-11-20
Grandfrais
No

In NonBlockingConnectionPool.unregister(), the following code is wrong :

// .. and return it to the pool only if max idle size is not reached
if ((maxIdle.get() != Integer.MAX_VALUE) || (pool.getNumIdle() >= maxIdle.get()))

should be :
if ((maxIdle.get() >= Integer.MAX_VALUE) || (pool.getNumIdle() >= maxIdle.get()))

Discussion


Log in to post a comment.