forward fd to agent

This commit is contained in:
Cloud Wu
2018-04-18 19:32:15 +08:00
parent d53d98b625
commit f4d5bc7aa4

View File

@@ -22,7 +22,7 @@ function handler.message(fd, msg, sz)
local c = connection[fd]
local agent = c.agent
if agent then
skynet.redirect(agent, c.client, "client", 1, msg, sz)
skynet.redirect(agent, c.client, "client", fd, msg, sz)
else
skynet.send(watchdog, "lua", "socket", "data", fd, netpack.tostring(msg, sz))
end