fix(package): [netutil] bracket IPv6 dial addresses (#398)

This commit is contained in:
Yusuf Efe authored and GitHub committed 2026-10-22 10:28:40 +08:00
1 parent e49a01e725
commit 3b94ec1932
2 files changed
+22 -1

No files matched your search

+1 -1
View File
@@ -315,7 +315,7 @@ func IsPingConnected(host string) bool {
// IsTelnetConnected checks if can telnet specified host or not.
// Play: https://go.dev/play/p/yiLCGtQv_ZG
func IsTelnetConnected(host string, port string) bool {
adder := host + ":" + port
adder := net.JoinHostPort(host, port)
conn, err := net.DialTimeout("tcp", adder, 5*time.Second)
if err != nil {