mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
bugfix: socket.block will block socket.close
This commit is contained in:
@@ -257,6 +257,9 @@ function socket.block(id)
|
|||||||
assert(not s.read_required)
|
assert(not s.read_required)
|
||||||
s.read_required = 0
|
s.read_required = 0
|
||||||
suspend(s)
|
suspend(s)
|
||||||
|
if not s.connected and s.closing then
|
||||||
|
skynet.wakeup(s.closing)
|
||||||
|
end
|
||||||
return s.connected
|
return s.connected
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user