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.
This commit is contained in:
Baptiste Assmann 2015-09-03 10:59:39 +02:00 committed by Willy Tarreau
parent 189363e35a
commit f0d9370f6b

View File

@ -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);
}
}