From f046f1156149d3d8563cc45d7608f2c42ef5b596 Mon Sep 17 00:00:00 2001 From: Baptiste Assmann Date: Thu, 27 Aug 2015 22:12:46 +0200 Subject: [PATCH] BUG/MEDIUM: dns: wrong first time DNS resolution First DNS resolution is supposed to be triggered by first health check, which is not the case with current code. This patch fixes this behavior by setting the resolution->last_resolution time to 0 instead of now_ms when parsing server's configuration at startup. --- src/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index e88302bf2..f3b0f1639 100644 --- a/src/server.c +++ b/src/server.c @@ -978,7 +978,7 @@ int parse_server(const char *file, int linenum, char **args, struct proxy *curpr curr_resolution->status = RSLV_STATUS_NONE; curr_resolution->step = RSLV_STEP_NONE; /* a first resolution has been done by the configuration parser */ - curr_resolution->last_resolution = now_ms; + curr_resolution->last_resolution = 0; newsrv->resolution = curr_resolution; skip_name_resolution: