Skip to content

Commit df02432

Browse files
committed
漏了一处
1 parent 43e375b commit df02432

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

script/pub/pub.lua

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@ end
1212

1313
local function channel_bpop(ctx)
1414
local selector, chan = ctx[1], ctx[2]
15-
for _ in selector:wait() do
16-
local r = table.pack(chan:pop())
17-
if r[1] == true then
18-
return table.unpack(r, 2)
15+
while true do
16+
for _ in selector:wait() do
17+
local r = table.pack(chan:pop())
18+
if r[1] == true then
19+
return table.unpack(r, 2)
20+
end
1921
end
22+
thread.sleep(10)
2023
end
2124
end
2225

0 commit comments

Comments
 (0)