mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
add comment for socket.close
This commit is contained in:
@@ -153,6 +153,8 @@ function socket.close(id)
|
|||||||
end
|
end
|
||||||
if s.connected then
|
if s.connected then
|
||||||
driver.close(s.id)
|
driver.close(s.id)
|
||||||
|
-- notice: call socket.close in __gc should be carefully,
|
||||||
|
-- because skynet.wait never return in __gc, so driver.clear may not be called
|
||||||
if s.co then
|
if s.co then
|
||||||
-- reading this socket on another coroutine
|
-- reading this socket on another coroutine
|
||||||
assert(not s.closing)
|
assert(not s.closing)
|
||||||
|
|||||||
Reference in New Issue
Block a user