if remaining < 0 then
local reset_after = tat - now
local retry_after = diff * -1
return {
0, -- allowed
0, -- remaining
tostring(retry_after),
tostring(reset_after),
}
end
the remaining less zero? It should not be less than one when it should prompt that the current request cannot be precessed? like in function allownMost:
if remaining < 1 then
local reset_after = tat - now
local retry_after = emission_interval - diff
return {
0, -- allowed
0, -- remaining
tostring(retry_after),
tostring(reset_after),
}
end
Q: I can not understand the specific difference between these two function? can you explain in more detail? thank you~
Q1: why does the code in function allown:
the remaining less zero? It should not be less than one when it should prompt that the current request cannot be precessed? like in function allownMost: