Fix ipv6 address advertisement

This commit is contained in:
Wim 2015-12-22 21:40:36 +01:00
parent 49d2793acc
commit e8e492f574

View file

@ -354,6 +354,11 @@ func (c *ServerCommand) detectAdvertise(detect physical.AdvertiseDetect,
return "", err return "", err
} }
// set [] for ipv6 addresses
if strings.Contains(host, ":") && !strings.Contains(host, "]") {
host = "[" + host + "]"
}
// Default the port and scheme // Default the port and scheme
scheme := "https" scheme := "https"
port := 8200 port := 8200