We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ccd0bcc commit 78e4497Copy full SHA for 78e4497
lua.go
@@ -43,7 +43,7 @@ local new_tat = tat + increment
43
local allow_at = new_tat - burst_offset
44
45
local diff = now - allow_at
46
-local remaining = math.floor(diff / emission_interval + 0.5)
+local remaining = diff / emission_interval
47
48
if remaining < 0 then
49
local reset_after = tat - now
@@ -97,9 +97,9 @@ end
97
tat = math.max(tat, now)
98
99
local diff = now - (tat - burst_offset)
100
101
102
-if remaining == 0 then
+if remaining < 1 then
103
104
local retry_after = emission_interval - diff
105
return {
0 commit comments