mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
@@ -633,6 +633,9 @@ function skynet.ret(msg, sz)
|
|||||||
local tag = session_coroutine_tracetag[running_thread]
|
local tag = session_coroutine_tracetag[running_thread]
|
||||||
if tag then c.trace(tag, "response") end
|
if tag then c.trace(tag, "response") end
|
||||||
local co_session = session_coroutine_id[running_thread]
|
local co_session = session_coroutine_id[running_thread]
|
||||||
|
if co_session == nil then
|
||||||
|
error "No session"
|
||||||
|
end
|
||||||
session_coroutine_id[running_thread] = nil
|
session_coroutine_id[running_thread] = nil
|
||||||
if co_session == 0 then
|
if co_session == 0 then
|
||||||
if sz ~= nil then
|
if sz ~= nil then
|
||||||
@@ -641,9 +644,6 @@ function skynet.ret(msg, sz)
|
|||||||
return false -- send don't need ret
|
return false -- send don't need ret
|
||||||
end
|
end
|
||||||
local co_address = session_coroutine_address[running_thread]
|
local co_address = session_coroutine_address[running_thread]
|
||||||
if not co_session then
|
|
||||||
error "No session"
|
|
||||||
end
|
|
||||||
local ret = c.send(co_address, skynet.PTYPE_RESPONSE, co_session, msg, sz)
|
local ret = c.send(co_address, skynet.PTYPE_RESPONSE, co_session, msg, sz)
|
||||||
if ret then
|
if ret then
|
||||||
return true
|
return true
|
||||||
|
|||||||
Reference in New Issue
Block a user