Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
hiteshk25 committed Oct 28, 2024
1 parent adc9d92 commit 23c56d3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public SlotReservation handleRequest(HttpServletRequest request) {
} catch (InterruptedException ie) {
return null;
}
return () -> PriorityBasedRateLimiter.this.release(requestPriority);
return () -> PriorityBasedRateLimiter.this.release();
}

private boolean acquire(RequestPriorities priority) throws InterruptedException {
Expand Down Expand Up @@ -82,7 +82,7 @@ private void exitFromQueue() {
this.activeRequests.addAndGet(-1);
}

private void release(RequestPriorities priority) {
private void release() {
if (this.activeRequests.get() > this.totalAllowedRequests) {
// priority one request is waiting, let's inform it
this.exitFromQueue();
Expand Down

0 comments on commit 23c56d3

Please sign in to comment.