mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
fix: cluster 支持ipv6地址字符串 (#2124)
Co-authored-by: zhuyin.zhu <zhuyin.zhu@bytedance.com>
This commit is contained in:
@@ -408,7 +408,8 @@ end
|
||||
|
||||
function socket.listen(host, port, backlog)
|
||||
if port == nil then
|
||||
host, port = string.match(host, "([^:]+):(.+)$")
|
||||
host, port = string.match(host, "(.+):([^:]+)$")
|
||||
host = host:match("^%[(.-)%]$") or host
|
||||
port = tonumber(port)
|
||||
end
|
||||
local id = driver.listen(host, port, backlog)
|
||||
|
||||
Reference in New Issue
Block a user