Skip to content

Commit

Permalink
Fix rate limiter window duration (#424)
Browse files Browse the repository at this point in the history
Gubernator's duration parameter should be in miliseconds, according to their own documentation: https://github.com/mailgun/gubernator/blob/v1.0.1-rc.1/README.md?plain=1#L41.
  • Loading branch information
douglascamata authored Dec 15, 2022
1 parent 11f9c13 commit feb2d1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ratelimit/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func WithSharedRateLimiter(logger log.Logger, client SharedRateLimiter, configs
name: requestName,
key: fmt.Sprintf("%s:%s", c.Tenant, c.Matcher.String()),
limit: int64(c.Limit),
duration: c.Window.Microseconds(),
duration: c.Window.Milliseconds(),
}}.Handler})
}

Expand Down

0 comments on commit feb2d1a

Please sign in to comment.