add comment for socket.close

This commit is contained in:
Cloud Wu
2014-03-12 14:39:30 +08:00
parent 7989daf9bb
commit b9aefc3ebc

View File

@@ -153,6 +153,8 @@ function socket.close(id)
end
if s.connected then
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
-- reading this socket on another coroutine
assert(not s.closing)