Skip to content

Commit

Permalink
Fix wait time
Browse files Browse the repository at this point in the history
  • Loading branch information
hexiaofeng committed Jan 24, 2025
1 parent f7328fc commit abd9a05
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected double getMaxStoredPermits() {

@Override
protected long adjustRequiredPermitsWaitTime(long startTime, long timeoutMicros, long nowMicros, long waitTime) {
return nowMicros + waitTime - startTime > timeoutMicros ? TIMEOUT : waitTime;
return waitTime > 0 && nowMicros + waitTime - startTime > timeoutMicros ? TIMEOUT : waitTime;
}

@Override
Expand Down

0 comments on commit abd9a05

Please sign in to comment.