From: Lennart Poettering Date: Wed, 24 Mar 2021 17:45:55 +0000 (+0100) Subject: resolved: use sd_event_add_time_relative() where appropriate X-Git-Tag: v249-rc1~497^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F19109%2Fhead;p=thirdparty%2Fsystemd.git resolved: use sd_event_add_time_relative() where appropriate --- diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c index 877b9bee0fb..b6da5133996 100644 --- a/src/resolve/resolved-dns-transaction.c +++ b/src/resolve/resolved-dns-transaction.c @@ -1962,11 +1962,13 @@ int dns_transaction_go(DnsTransaction *t) { assert_not_reached("bad protocol"); } - r = sd_event_add_time( + assert(!t->timeout_event_source); + + r = sd_event_add_time_relative( t->scope->manager->event, &t->timeout_event_source, clock_boottime_or_monotonic(), - ts + jitter, accuracy, + jitter, accuracy, on_transaction_timeout, t); if (r < 0) return r;