Skip to content

Commit

Permalink
漏了一处
Browse files Browse the repository at this point in the history
  • Loading branch information
sumneko committed May 10, 2024
1 parent 43e375b commit df02432
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions script/pub/pub.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ end

local function channel_bpop(ctx)
local selector, chan = ctx[1], ctx[2]
for _ in selector:wait() do
local r = table.pack(chan:pop())
if r[1] == true then
return table.unpack(r, 2)
while true do
for _ in selector:wait() do
local r = table.pack(chan:pop())
if r[1] == true then
return table.unpack(r, 2)
end
end
thread.sleep(10)
end
end

Expand Down

0 comments on commit df02432

Please sign in to comment.