diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index 76c97e1c9d..4a4cc3a20e 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -2725,6 +2725,9 @@ _public_ int sd_event_source_set_time_relative(sd_event_source *s, uint64_t usec assert_return(s, -EINVAL); assert_return(EVENT_SOURCE_IS_TIME(s->type), -EDOM); + if (usec == USEC_INFINITY) + return sd_event_source_set_time(s, USEC_INFINITY); + r = sd_event_now(s->event, event_source_type_to_clock(s->type), &t); if (r < 0) return r;