]> 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)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 13 Nov 2018 13:10:42 +0000 (15:10 +0200)
src/dns/dns-client.c

index c535f86bf6fb65587133d2ce9907c30619bc2f44..463443da51effedfc54140c53fee77ee520f5c48 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);