cluster.open returns addr, port

This commit is contained in:
Cloud Wu
2022-09-04 14:32:31 +08:00
parent b61daaccf1
commit 2d5e4ae528
3 changed files with 6 additions and 6 deletions

View File

@@ -148,8 +148,8 @@ function command.listen(source, addr, port)
local address = assert(node_address[addr], addr .. " is down")
addr, port = string.match(address, "([^:]+):(.*)$")
end
skynet.call(gate, "lua", "open", { address = addr, port = port })
skynet.ret(skynet.pack(nil))
local addr, port = skynet.call(gate, "lua", "open", { address = addr, port = port })
skynet.ret(skynet.pack(addr, port))
end
function command.sender(source, node)