]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dns: Fix duration field in dns_worker_request_finished event
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 29 Aug 2018 17:43:22 +0000 (20:43 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Thu, 30 Aug 2018 07:26:27 +0000 (07:26 +0000)
src/dns/dns-client.c

index 78ea2843d1cbb9176b9a3c4f7740d05ce3471ddd..d069503fc08cf3066b283bdd8278ccf1cc378220 100644 (file)
@@ -51,6 +51,9 @@ static int dns_client_input_args(struct connection *client, const char *const *a
                        /* shouldn't happen, but fix it anyway.. */
                        ret = EAI_NONAME;
                }
+               /* update timestamp after hostname lookup so the event duration
+                  field gets set correctly */
+               io_loop_time_refresh();
                if (ret != 0) {
                        const char *err = net_gethosterror(ret);
                        e->add_int("error_code", ret);