mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 03:53:09 +00:00
work thread for channel may not create if you never connect
This commit is contained in:
@@ -411,10 +411,10 @@ end
|
||||
|
||||
function channel:close()
|
||||
if not self.__closed then
|
||||
local thread = assert(self.__dispatch_thread)
|
||||
local thread = self.__dispatch_thread
|
||||
self.__closed = true
|
||||
close_channel_socket(self)
|
||||
if not self.__response and self.__dispatch_thread == thread then
|
||||
if not self.__response and self.__dispatch_thread == thread and thread then
|
||||
-- dispatch by order, send close signal to dispatch thread
|
||||
push_response(self, true, false) -- (true, false) is close signal
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user