From f0d9370f6b6696b5fdcf3e0f1741e6e4a16a7b0f Mon Sep 17 00:00:00 2001 From: Baptiste Assmann Date: Thu, 3 Sep 2015 10:59:39 +0200 Subject: [PATCH] BUG/MEDIUM: dns: DNS resolution doesn't start Patch f046f1156149d3d8563cc45d7608f2c42ef5b596 introduced a regression: DNS resolution doesn't start anymore, while it was supposed to make it start with first health check. Current patch fix this issue by triggering a new DNS resolution if the last_resolution time is not set. --- src/checks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/checks.c b/src/checks.c index e386bee6c..3fb166bfd 100644 --- a/src/checks.c +++ b/src/checks.c @@ -2155,7 +2155,7 @@ static struct task *process_chk(struct task *t) * if there has not been any name resolution for a longer period than * hold.valid, let's trigger a new one. */ - if (tick_is_expired(tick_add(resolution->last_resolution, resolution->resolvers->hold.valid), now_ms)) { + if (!resolution->last_resolution || tick_is_expired(tick_add(resolution->last_resolution, resolution->resolvers->hold.valid), now_ms)) { trigger_resolution(s); } }