Skip to content

Commit 573c4bc

Browse files
cfergeauredbeam
authored andcommitted
daemon: Use net.JoinHostPort
1 parent 4b28ad0 commit 573c4bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/crc/cmd/daemon.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ func run(configuration *types.Configuration) error {
177177
}
178178
}()
179179

180-
ln, err := vn.Listen("tcp", fmt.Sprintf("%s:80", configuration.GatewayIP))
180+
ln, err := vn.Listen("tcp", net.JoinHostPort(configuration.GatewayIP, "80"))
181181
if err != nil {
182182
return err
183183
}
@@ -193,7 +193,7 @@ func run(configuration *types.Configuration) error {
193193
}
194194
}()
195195

196-
networkListener, err := vn.Listen("tcp", fmt.Sprintf("%s:80", hostVirtualIP))
196+
networkListener, err := vn.Listen("tcp", net.JoinHostPort(hostVirtualIP, "80"))
197197
if err != nil {
198198
return err
199199
}

0 commit comments

Comments
 (0)