首先要明白两点
1. skynet.call() 是阻塞的,可通过skynet.pack()、return 响应
2. session 只有使用 skynet.call() 或 skynet.rawcall() 时才有意义
尝试将 skynet.call() 对应的 skynet.pack() 改成 return
local isok, agent = skynet.call("agentmgr", "lua", "reqlogin", client, node, gate)
对应:
s.resp.reqlogin = function(source, client, node, gate)
local agent = handle
--skynet.retpack(true, agent)
return true, agent
end
具体可以参考
https://blog.csdn.net/gneveek/article/details/78944817