mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
reset pause after wait
This commit is contained in:
@@ -46,9 +46,11 @@ local function suspend(s)
|
|||||||
skynet.yield() -- there are subsequent socket messages in mqueue, maybe.
|
skynet.yield() -- there are subsequent socket messages in mqueue, maybe.
|
||||||
skynet.error(string.format("Resume socket (%d)", s.id))
|
skynet.error(string.format("Resume socket (%d)", s.id))
|
||||||
driver.start(s.id)
|
driver.start(s.id)
|
||||||
|
skynet.wait(s.co)
|
||||||
s.pause = nil
|
s.pause = nil
|
||||||
|
else
|
||||||
|
skynet.wait(s.co)
|
||||||
end
|
end
|
||||||
skynet.wait(s.co)
|
|
||||||
-- wakeup closing corouting every time suspend,
|
-- wakeup closing corouting every time suspend,
|
||||||
-- because socket.close() will wait last socket buffer operation before clear the buffer.
|
-- because socket.close() will wait last socket buffer operation before clear the buffer.
|
||||||
if s.closing then
|
if s.closing then
|
||||||
|
|||||||
Reference in New Issue
Block a user