Skip to content

Commit f93bb0c

Browse files
committed
Tweak previous fix.
1 parent 6184f2e commit f93bb0c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/com/ning/http/client/providers/grizzly/GrizzlyConnectionsPool.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,11 @@ public boolean removeAll(Connection connection) {
227227
boolean isRemoved = false;
228228
for (Map.Entry<String, DelayedExecutor.IdleConnectionQueue> entry : connectionsPool.entrySet()) {
229229
boolean removed = entry.getValue().remove(connection);
230-
if (removed) {
231-
totalCachedConnections.decrementAndGet();
232-
}
233230
isRemoved |= removed;
234231
}
232+
if (isRemoved) {
233+
totalCachedConnections.decrementAndGet();
234+
}
235235
return isRemoved;
236236

237237
}

0 commit comments

Comments
 (0)