node: fix listening on IPv6 address (#27628) (#27635)

This commit is contained in:
Curith authored and GitHub committed 2023-07-02 13:21:16 +02:00
1 parent 8bbb16b70e
commit 6ca3ef9a7b
5 files changed
+10 -6

No files matched your search

+1 -1
View File
@@ -112,7 +112,7 @@ func (h *httpServer) setListenAddr(host string, port int) error {
}
h.host, h.port = host, port
h.endpoint = fmt.Sprintf("%s:%d", host, port)
h.endpoint = net.JoinHostPort(host, fmt.Sprintf("%d", port))
return nil
}