Disconnected during auth, See #1513

This commit is contained in:
Cloud Wu
2021-12-10 20:48:51 +08:00
parent 3b54b3bd80
commit 208be03a6f

View File

@@ -388,13 +388,17 @@ end
local function check_connection(self)
if self.__sock then
local authco = self.__authcoroutine
if socket.disconnected(self.__sock[1]) then
-- closed by peer
skynet.error("socket: disconnect detected ", self.__host, self.__port)
close_channel_socket(self)
if authco and authco == coroutine.running() then
-- disconnected during auth, See #1513
return false
end
return
end
local authco = self.__authcoroutine
if not authco then
return true
end