From b9aefc3ebc1758a892f44e2839612cd04e5343d7 Mon Sep 17 00:00:00 2001 From: Cloud Wu Date: Wed, 12 Mar 2014 14:39:30 +0800 Subject: [PATCH] add comment for socket.close --- lualib/socket.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lualib/socket.lua b/lualib/socket.lua index 4eaa24d8..12c53f41 100644 --- a/lualib/socket.lua +++ b/lualib/socket.lua @@ -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)