Merge pull request #1273 from weaveworks/1270_mdns_result_race

ignore DuplicateError when inserting mDNS answer in zone
This commit is contained in:
Alvaro committed 2015-08-10 11:15:47 +02:00
commit 475daa82b3
1 file changed
+5 -3
+5 -3
View File
@@ -103,9 +103,11 @@ func (zone *ZoneDb) domainLookup(target string, lfun ZoneLookupFunc) (res []Zone
for _, answer := range lanswers {
r, err := remoteIdent.addIPToName(answer, now)
if err != nil {
zone.mx.Unlock()
Warning.Printf("[zonedb] '%s' insertion for %s failed: %s", answer, target, err)
return nil, err
if _, ok := err.(DuplicateError); !ok {
zone.mx.Unlock()
Warning.Printf("[zonedb] '%s' insertion for %s failed: %s", answer, target, err)
return nil, err
}
}
uniq.add(r)
}