Fix detection of missing port

This commit is contained in:
Alex Dadgar 2017-02-16 13:10:24 -08:00
parent e3b92afc77
commit 297ee0b1bd

View file

@ -809,7 +809,7 @@ func normalizeAdvertise(addr string, bind string, defport int, dev bool) (string
func isMissingPort(err error) bool { func isMissingPort(err error) bool {
// matches error const in net/ipsock.go // matches error const in net/ipsock.go
const missingPort = "missing port in address" const missingPort = "missing port in address"
return err != nil && strings.HasPrefix(err.Error(), missingPort) return err != nil && strings.Contains(err.Error(), missingPort)
} }
// Merge is used to merge two server configs together // Merge is used to merge two server configs together