mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 12:20:41 +00:00
raise socket error during auth
This commit is contained in:
@@ -418,6 +418,12 @@ local function block_connect(self, once)
|
|||||||
if #self.__connecting > 0 then
|
if #self.__connecting > 0 then
|
||||||
-- connecting in other coroutine
|
-- connecting in other coroutine
|
||||||
local co = coroutine.running()
|
local co = coroutine.running()
|
||||||
|
for _, v in ipairs(self.__connecting) do
|
||||||
|
if v == co then
|
||||||
|
-- socket closed during auth (connecting) , See Issue #1513
|
||||||
|
error(socket_error)
|
||||||
|
end
|
||||||
|
end
|
||||||
table.insert(self.__connecting, co)
|
table.insert(self.__connecting, co)
|
||||||
skynet.wait(co)
|
skynet.wait(co)
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user