Skip to content

Commit 3598b81

Browse files
author
九尘
committed
ZOOKEEPER-4933: Fixed the issue where all connections were rejected when there were no requests for a long time
1 parent aeadf57 commit 3598b81

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

zookeeper-server/src/main/java/org/apache/zookeeper/server/BlueThrottle.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ public synchronized boolean checkLimit(int need) {
323323

324324
long now = Time.currentElapsedTime();
325325
long diff = now - lastTime;
326+
diff = Math.min((long) maxTokens * fillTime / fillCount, diff);
326327

327328
if (diff > fillTime) {
328329
int refill = (int) (diff * fillCount / fillTime);

0 commit comments

Comments
 (0)