|
@@ -100,7 +100,7 @@ func newListenerAndURL(hostport string) (ln net.Listener, url string, isLocal bo
|
100
|
100
|
if ln, err = net.Listen("tcp", hostport); err != nil {
|
101
|
101
|
return nil, "", false, err
|
102
|
102
|
}
|
103
|
|
- url = fmt.Sprint("http://", host, ":", ln.Addr().(*net.TCPAddr).Port)
|
|
103
|
+ url = fmt.Sprint("http://", net.JoinHostPort(host, fmt.Sprint(ln.Addr().(*net.TCPAddr).Port)))
|
104
|
104
|
return ln, url, isLocalhost(host), nil
|
105
|
105
|
}
|
106
|
106
|
|