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
|
||||
skynet.wakeup(co)
|
||||
end
|
||||
if not self.__sock then
|
||||
-- closed
|
||||
wakeup_all(self, "channel_closed")
|
||||
break
|
||||
end
|
||||
else
|
||||
self.__thread[session] = nil
|
||||
skynet.error("socket: unknown session :", session)
|
||||
@@ -211,6 +216,11 @@ local function dispatch_by_order(self)
|
||||
self.__result_data[co] = result_data
|
||||
end
|
||||
skynet.wakeup(co)
|
||||
if not self.__sock then
|
||||
-- closed
|
||||
wakeup_all(self, "channel_closed")
|
||||
break
|
||||
end
|
||||
else
|
||||
close_channel_socket(self)
|
||||
local errmsg
|
||||
|
||||
Reference in New Issue
Block a user