Skip to content

Commit

Permalink
[fix] rate limit pause
Browse files Browse the repository at this point in the history
  • Loading branch information
VCgege authored and patpatbear committed Jul 16, 2024
1 parent 6e0c87b commit 3391f0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ctrip_swap_evict.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ void swapRateLimitPause(swapRatelimitCtx *rlctx, client *c) {
if (server.swap_ratelimit_policy != SWAP_RATELIMIT_POLICY_PAUSE) return;

if (swapRatelimitNeeded(rlctx,server.swap_ratelimit_policy,&pause_ms) &&
pause_ms > 0 && c->rate_limit_event_id != -1) {
pause_ms > 0 && c->rate_limit_event_id == -1) {
protectClient(c);
c->rate_limit_event_id = aeCreateTimeEvent(server.el,pause_ms,unprotectClientdProc,c,NULL);
server.stat_swap_ratelimit_client_pause_count++;
Expand Down

0 comments on commit 3391f0c

Please sign in to comment.