mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
Disconnected during auth, See #1513
This commit is contained in:
@@ -388,13 +388,17 @@ end
|
|||||||
|
|
||||||
local function check_connection(self)
|
local function check_connection(self)
|
||||||
if self.__sock then
|
if self.__sock then
|
||||||
|
local authco = self.__authcoroutine
|
||||||
if socket.disconnected(self.__sock[1]) then
|
if socket.disconnected(self.__sock[1]) then
|
||||||
-- closed by peer
|
-- closed by peer
|
||||||
skynet.error("socket: disconnect detected ", self.__host, self.__port)
|
skynet.error("socket: disconnect detected ", self.__host, self.__port)
|
||||||
close_channel_socket(self)
|
close_channel_socket(self)
|
||||||
|
if authco and authco == coroutine.running() then
|
||||||
|
-- disconnected during auth, See #1513
|
||||||
|
return false
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local authco = self.__authcoroutine
|
|
||||||
if not authco then
|
if not authco then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user