diff --git a/wsl-pro-service/internal/controlstream/controlstream.go b/wsl-pro-service/internal/controlstream/controlstream.go index 909cf8384..50718e12e 100644 --- a/wsl-pro-service/internal/controlstream/controlstream.go +++ b/wsl-pro-service/internal/controlstream/controlstream.go @@ -138,7 +138,7 @@ func (cs ControlStream) address(ctx context.Context) (string, error) { return "", fmt.Errorf("could not parse port from %q: %v", addr, err) } - return fmt.Sprintf("%s:%s", windowsLocalhost, port), nil + return net.JoinHostPort(windowsLocalhost.String(), port), nil } // ReservedPort returns the port assigned to this distro.