Skip to content

Commit

Permalink
Disconnected during auth, See #1513
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwu committed Dec 10, 2021
1 parent 3b54b3b commit 208be03
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lualib/skynet/socketchannel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 208be03

Please sign in to comment.