mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-23 19:43:09 +00:00
revert wakeup_response
This commit is contained in:
@@ -125,17 +125,6 @@ local function pop_response(self)
|
||||
end
|
||||
self.__wait_response = coroutine.running()
|
||||
skynet.wait(self.__wait_response)
|
||||
if not self.__sock then
|
||||
-- disconnected before request, terminate dispatch_by_order
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function wakeup_response(self)
|
||||
if self.__wait_response then
|
||||
skynet.wakeup(self.__wait_response)
|
||||
self.__wait_response = nil
|
||||
end
|
||||
end
|
||||
|
||||
@@ -146,7 +135,6 @@ local function autoclose_cb(self, fd)
|
||||
-- closed by peer
|
||||
skynet.error("socket closed by peer : ", self.__host, self.__port)
|
||||
close_channel_socket(self)
|
||||
wakeup_response(self)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -158,7 +146,10 @@ local function push_response(self, response, co)
|
||||
-- response is a function, push it to __request
|
||||
table.insert(self.__request, response)
|
||||
table.insert(self.__thread, co)
|
||||
wakeup_response(self)
|
||||
if self.__wait_response then
|
||||
skynet.wakeup(self.__wait_response)
|
||||
self.__wait_response = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user