Skip to content

Commit

Permalink
daemon: Use net.JoinHostPort
Browse files Browse the repository at this point in the history
  • Loading branch information
cfergeau committed Sep 11, 2024
1 parent 6e285a1 commit 3940f8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/crc/cmd/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func run(configuration *types.Configuration) error {
}
}()

ln, err := vn.Listen("tcp", fmt.Sprintf("%s:80", configuration.GatewayIP))
ln, err := vn.Listen("tcp", net.JoinHostPort(configuration.GatewayIP, "80"))
if err != nil {
return err
}
Expand All @@ -171,7 +171,7 @@ func run(configuration *types.Configuration) error {
}
}()

networkListener, err := vn.Listen("tcp", fmt.Sprintf("%s:80", hostVirtualIP))
networkListener, err := vn.Listen("tcp", net.JoinHostPort(hostVirtualIP, "80"))
if err != nil {
return err
}
Expand Down

0 comments on commit 3940f8e

Please sign in to comment.