mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-09-22 17:54:57 +02:00
Fixup prefetch only when needed
git-svn-id: file:///svn/unbound/trunk@3904 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
+3
-3
@@ -1027,9 +1027,9 @@ worker_handle_request(struct comm_point* c, void* arg, int error,
|
||||
sldns_buffer_read_u16_at(c->buffer, 2), repinfo,
|
||||
&edns)) {
|
||||
/* prefetch it if the prefetch TTL expired */
|
||||
if((worker->env.cfg->prefetch && *worker->env.now >=
|
||||
((struct reply_info*)e->data)->prefetch_ttl)
|
||||
|| worker->env.cfg->serve_expired) {
|
||||
if((worker->env.cfg->prefetch || worker->env.cfg->serve_expired)
|
||||
&& *worker->env.now >=
|
||||
((struct reply_info*)e->data)->prefetch_ttl) {
|
||||
time_t leeway = ((struct reply_info*)e->
|
||||
data)->ttl - *worker->env.now;
|
||||
if(((struct reply_info*)e->data)->ttl
|
||||
|
||||
Reference in New Issue
Block a user