Skip to content

Commit

Permalink
ratelimit: do not multiply the expiration with the interval
Browse files Browse the repository at this point in the history
  • Loading branch information
razvancrainea committed Jun 5, 2015
1 parent 0708685 commit b3b5888
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/ratelimit/ratelimit_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ int rl_get_all_counters(rl_pipe_t *pipe)

for (i = 0; i < rl_dests_nr; i++) {
/* if the replication expired, reset its counter */
if (pipe->dsts[i].update + (rl_repl_timer_expire * rl_timer_interval) < now)
if ((pipe->dsts[i].update + rl_repl_timer_expire) < now)
pipe->dsts[i].counter = 0;
counter += pipe->dsts[i].counter;
}
Expand Down

0 comments on commit b3b5888

Please sign in to comment.