Skip to content

Commit 31e0ac2

Browse files
committed
Disconected during auth, See #1513
1 parent 3b54b3b commit 31e0ac2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lualib/skynet/socketchannel.lua

+5-1
Original file line numberDiff line numberDiff line change
@@ -388,13 +388,17 @@ end
388388

389389
local function check_connection(self)
390390
if self.__sock then
391+
local authco = self.__authcoroutine
391392
if socket.disconnected(self.__sock[1]) then
392393
-- closed by peer
393394
skynet.error("socket: disconnect detected ", self.__host, self.__port)
394395
close_channel_socket(self)
396+
if authco and authco == coroutine.running() then
397+
-- disconnected during auth, See #1513
398+
return false
399+
end
395400
return
396401
end
397-
local authco = self.__authcoroutine
398402
if not authco then
399403
return true
400404
end

0 commit comments

Comments
 (0)