Skip to content

Commit

Permalink
backport fix for ArithmeticException
Browse files Browse the repository at this point in the history
  • Loading branch information
lorban committed Dec 17, 2020
1 parent 38f0fc4 commit 4478233
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions jetty-util/src/main/java/org/eclipse/jetty/util/Pool.java
Expand Up @@ -301,6 +301,11 @@ public Entry acquire()
{
LOGGER.ignore(e);
size = entries.size();
// Size can be 0 when the pool is in the middle of
// acquiring a connection while another thread
// removes the last one from the pool.
if (size == 0)
break;
}
index = (index + 1) % size;
}
Expand Down

0 comments on commit 4478233

Please sign in to comment.