Skip to content

Commit

Permalink
Fix a mistake of redis ttl
Browse files Browse the repository at this point in the history
  • Loading branch information
ri-char authored Aug 21, 2023
1 parent 0151a16 commit c304a37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tokenbucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ func (t *TokenBucketRedis) SetState(ctx context.Context, state TokenBucketState)
state.Last,
state.Available,
// TTL in milliseconds.
int64(t.ttl/time.Microsecond)).Result()
int64(t.ttl/time.Millisecond)).Result()

if err == nil {
err = checkResponseFromRedis(result, []interface{}{t.lastVersion + 1, int64(1), "OK", "OK"})
Expand Down

0 comments on commit c304a37

Please sign in to comment.