Skip to content

Commit

Permalink
fix(wsl-pro-service): Fix bug where IPv6 addresses where badly concat…
Browse files Browse the repository at this point in the history
…enated with port (#622)

Thanks iosifache for noticing!

Co-authored-by: Didier Roche-Tolomelli <[email protected]>
  • Loading branch information
EduardGomezEscandell and didrocks authored Feb 29, 2024
2 parents 80eb523 + 0264e5c commit d7edad8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wsl-pro-service/internal/controlstream/controlstream.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d7edad8

Please sign in to comment.