mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
fix socketchannel closed thread not wakeup (#2020)
This commit is contained in:
@@ -116,6 +116,11 @@ local function dispatch_by_session(self)
|
|||||||
end
|
end
|
||||||
skynet.wakeup(co)
|
skynet.wakeup(co)
|
||||||
end
|
end
|
||||||
|
if not self.__sock then
|
||||||
|
-- closed
|
||||||
|
wakeup_all(self, "channel_closed")
|
||||||
|
break
|
||||||
|
end
|
||||||
else
|
else
|
||||||
self.__thread[session] = nil
|
self.__thread[session] = nil
|
||||||
skynet.error("socket: unknown session :", session)
|
skynet.error("socket: unknown session :", session)
|
||||||
@@ -211,6 +216,11 @@ local function dispatch_by_order(self)
|
|||||||
self.__result_data[co] = result_data
|
self.__result_data[co] = result_data
|
||||||
end
|
end
|
||||||
skynet.wakeup(co)
|
skynet.wakeup(co)
|
||||||
|
if not self.__sock then
|
||||||
|
-- closed
|
||||||
|
wakeup_all(self, "channel_closed")
|
||||||
|
break
|
||||||
|
end
|
||||||
else
|
else
|
||||||
close_channel_socket(self)
|
close_channel_socket(self)
|
||||||
local errmsg
|
local errmsg
|
||||||
|
|||||||
Reference in New Issue
Block a user