Skip to content

Commit

Permalink
[netty#3881] FixedChannelPool creates 1 more channel than maxConnections
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
normanmaurer committed Jun 16, 2015
1 parent f5fd34e commit 8925fe4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ private void decrementAndRunTaskQueue() {
}

private void runTaskQueue() {
while (acquiredChannelCount <= maxConnections) {
while (acquiredChannelCount < maxConnections) {
AcquireTask task = pendingAcquireQueue.poll();
if (task == null) {
break;
Expand Down

0 comments on commit 8925fe4

Please sign in to comment.