From: Baptiste Assmann Date: Thu, 3 Sep 2015 08:59:39 +0000 (+0200) Subject: BUG/MEDIUM: dns: DNS resolution doesn't start X-Git-Tag: v1.6-dev5~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f0d9370f6b6696b5fdcf3e0f1741e6e4a16a7b0f;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/checks.c b/src/checks.c index e386bee6c9..3fb166bfd9 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); } }