mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
Revert "Update the return values of socket.listen, also return the real port bind to zero (#1638)"
This reverts commit c1eeba215d.
This commit is contained in:
@@ -148,9 +148,8 @@ function command.listen(source, addr, port)
|
||||
local address = assert(node_address[addr], addr .. " is down")
|
||||
addr, port = string.match(address, "([^:]+):(.*)$")
|
||||
end
|
||||
|
||||
local param = { address = addr, port = port }
|
||||
skynet.ret(skynet.pack(skynet.call(gate, "lua", "open", param)))
|
||||
skynet.call(gate, "lua", "open", { address = addr, port = port })
|
||||
skynet.ret(skynet.pack(nil))
|
||||
end
|
||||
|
||||
function command.sender(source, node)
|
||||
|
||||
@@ -11,9 +11,8 @@ skynet.register_protocol {
|
||||
|
||||
local handler = {}
|
||||
|
||||
function handler.open(source, conf, port)
|
||||
function handler.open(source, conf)
|
||||
watchdog = conf.watchdog or source
|
||||
return port
|
||||
end
|
||||
|
||||
function handler.message(fd, msg, sz)
|
||||
|
||||
Reference in New Issue
Block a user