1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-31 14:50:15 +03:00

resolved: use sd_event_add_time_relative() where appropriate

This commit is contained in:
Lennart Poettering 2021-03-24 18:45:55 +01:00
parent 213cb4f7e4
commit 6d660692f2

View File

@ -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;