diff options
Diffstat (limited to 'listeners.go')
| -rw-r--r-- | listeners.go | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/listeners.go b/listeners.go index 04ec788..8c2792c 100644 --- a/listeners.go +++ b/listeners.go @@ -286,9 +286,10 @@ func JoinNetworkAddress(network, host, port string) string {  	if network != "" {  		a = network + "/"  	} -	a += host -	if port != "" { -		a += ":" + port +	if host != "" && port == "" { +		a += host +	} else if port != "" { +		a += net.JoinHostPort(host, port)  	}  	return a  } | 
