[#3881] FixedChannelPool creates 1 more channel than maxConnections

Motivation:

FixedChannelPool should enforce a number of maximal used channels, but due a bug we fail to correctly enforce this.

Modifications:

Change check to correctly only acquire channel if we not hit the limit yet.

Result:

Correct limiting.
This commit is contained in:
Norman Maurer 2015-06-12 06:19:10 +02:00
parent 09d826ed46
commit 4a0d68c50b

View File

@ -264,7 +264,7 @@ public final class FixedChannelPool extends SimpleChannelPool {
}
private void runTaskQueue() {
while (acquiredChannelCount <= maxConnections) {
while (acquiredChannelCount < maxConnections) {
AcquireTask task = pendingAcquireQueue.poll();
if (task == null) {
break;