chiark / gitweb /
resolved: use CLOCK_BOOTTIME instead of CLOCK_MONOTONIC when aging caches and timeing...
[elogind.git] / src / resolve / resolved-dns-query.c
index 57f7467667db68aa710be8b2ec5293bbef563108..36cfc026eaf7a67641b25f82c89448f7bbedd7d0 100644 (file)
@@ -278,7 +278,12 @@ int dns_query_go(DnsQuery *q) {
         q->answer_ifindex = 0;
         q->answer_rcode = 0;
 
-        r = sd_event_add_time(q->manager->event, &q->timeout_event_source, CLOCK_MONOTONIC, now(CLOCK_MONOTONIC) + QUERY_TIMEOUT_USEC, 0, on_query_timeout, q);
+        r = sd_event_add_time(
+                        q->manager->event,
+                        &q->timeout_event_source,
+                        clock_boottime_or_monotonic(),
+                        now(clock_boottime_or_monotonic()) + QUERY_TIMEOUT_USEC, 0,
+                        on_query_timeout, q);
         if (r < 0)
                 goto fail;