From 297ee0b1bd0f13cb990f5be1a7fbf4922d5b09ad Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Thu, 16 Feb 2017 13:10:24 -0800 Subject: [PATCH] Fix detection of missing port --- command/agent/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/agent/config.go b/command/agent/config.go index dc90c740f..9efac4b4d 100644 --- a/command/agent/config.go +++ b/command/agent/config.go @@ -809,7 +809,7 @@ func normalizeAdvertise(addr string, bind string, defport int, dev bool) (string func isMissingPort(err error) bool { // matches error const in net/ipsock.go 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