serve-stale on overflow

This commit is contained in:
Frank Denis 2021-08-04 14:30:32 +02:00
parent c8a61abb79
commit 1052fa6323
1 changed files with 5 additions and 2 deletions

View File

@ -603,8 +603,11 @@ func (proxy *Proxy) processIncomingQuery(clientProto string, serverProto string,
return
}
}
if onlyCached && len(response) == 0 {
return
if onlyCached {
if len(response) == 0 {
return
}
serverInfo = nil
}
if len(response) == 0 && serverInfo != nil {
var ttl *uint32