mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 12:20:41 +00:00
more error message for socket, and close listen socket when reach limit of open files. See Issue #339
This commit is contained in:
@@ -101,17 +101,24 @@ function gateserver.start(handler)
|
||||
end
|
||||
|
||||
function MSG.close(fd)
|
||||
if handler.disconnect then
|
||||
handler.disconnect(fd)
|
||||
if fd ~= socket then
|
||||
if handler.disconnect then
|
||||
handler.disconnect(fd)
|
||||
end
|
||||
close_fd(fd)
|
||||
end
|
||||
close_fd(fd)
|
||||
end
|
||||
|
||||
function MSG.error(fd, msg)
|
||||
if handler.error then
|
||||
handler.error(fd, msg)
|
||||
if fd == socket then
|
||||
socketdriver.close(fd)
|
||||
skynet.error(msg)
|
||||
else
|
||||
if handler.error then
|
||||
handler.error(fd, msg)
|
||||
end
|
||||
close_fd(fd)
|
||||
end
|
||||
close_fd(fd)
|
||||
end
|
||||
|
||||
function MSG.warning(fd, size)
|
||||
|
||||
Reference in New Issue
Block a user