From 7478d6257c977a47d547cd8f2882b2370ab0b563 Mon Sep 17 00:00:00 2001 From: "maycxc.github.io" <9441877+MayCXC@users.noreply.github.com> Date: Sat, 12 Oct 2024 19:18:59 -0400 Subject: [PATCH] [] --- listeners.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/listeners.go b/listeners.go index 7f060e8dc..6cf66ef48 100644 --- a/listeners.go +++ b/listeners.go @@ -390,8 +390,7 @@ func SplitNetworkAddress(a string) (network, host, port string, err error) { firstErr := err if err != nil { - a = strings.TrimPrefix(a, "[") // IPv6 - a = strings.TrimSuffix(a, "]") + a = strings.TrimPrefix(a, "[]") // IPv6 // in general, if there was an error, it was likely "missing port", // so try adding a bogus port to take advantage of standard library's // robust parser, then strip the artificial port.