diff --git a/libnetwork/network.go b/libnetwork/network.go index 4086f6db06..393d4fdcda 100644 --- a/libnetwork/network.go +++ b/libnetwork/network.go @@ -2001,7 +2001,13 @@ func (n *network) ResolveName(req string, ipType int) ([]net.IP, bool) { strings.HasSuffix(req, strings.TrimPrefix(key, "*"))) { selectedKey = key ok = true - ipSet, _ = sr.svcMap.Get(selectedKey) + var found bool + ipSet, found = sr.svcMap.Get(selectedKey) + if !found { + logrus.Errorf("svcMap changed unexpectedly looking for key %s", key) + continue + } + break } }