We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a5ff0db commit 39e967bCopy full SHA for 39e967b
1 file changed
intra/dnsx/alg.go
@@ -285,7 +285,7 @@ func (p *xips) merge(q *xips) {
285
defer q.pmu.RUnlock()
286
287
for k, v := range q.pri {
288
- if aa := p.pri[k]; !aa.fresh() {
+ if aa, ok := p.pri[k]; !ok || !aa.fresh() {
289
p.pri[k] = v
290
} else {
291
ips := copyUniq(aa.alive(), v.alive())
@@ -310,6 +310,7 @@ type baseans struct {
310
ttl time.Time // ttl for this alg translation
311
}
312
313
+// fresh returns false if a has expired or if a is nil
314
func (a *baseans) fresh() bool {
315
if a == nil {
316
return false
0 commit comments