Skip to content

Commit

Permalink
remove shrinking queue workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
JensErat committed Aug 21, 2023
1 parent 131e181 commit 7432cea
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kong/tools/queue.lua
Expand Up @@ -255,8 +255,7 @@ function Queue:process_once()
end

local batch = {unpack(self.entries, self.front, self.front + entry_count - 1)}
-- Guard against queue shrinkage during handler invocation by using math.min below.
for _ = 1, math.min(entry_count, self:count()) do
for _ = 1, entry_count do
self:delete_frontmost_entry()
end
if self.queue_full then
Expand Down

0 comments on commit 7432cea

Please sign in to comment.