fix: httpc支持ipv6 (#2125)

* fix: httpc支持ipv6

* httpc ip:port解析放在c层

* lua-socket.c listen增加ip:port字符串解析, 相关cluster代码修改 #2124

* socketchannel changehost port可置空

* socketchannel changehost恢复port判空

* httpc解析域名加端口号逻辑优化

* 注释中字符串模式内容格式优化

---------

Co-authored-by: zhuyin.zhu <zhuyin.zhu@bytedance.com>
This commit is contained in:
IAN.Z
2025-12-27 17:11:52 +08:00
committed by GitHub
parent 1bbdeb3132
commit bed435660e
7 changed files with 41 additions and 39 deletions

View File

@@ -60,10 +60,10 @@ end
function command.changenode(host, port)
if not host then
skynet.error(string.format("Close cluster sender %s:%d", channel.__host, channel.__port))
skynet.error("Close cluster sender", channel.__host, channel.__port)
channel:close()
else
channel:changehost(host, tonumber(port))
channel:changehost(host, port)
channel:connect(true)
end
skynet.ret(skynet.pack(nil))