mirror of
https://github.com/systemd/systemd.git
synced 2024-11-08 11:27:32 +03:00
automount: do not start expiration timer for TimeoutIdleSec=0
The timer value for automount unit specified with TimeoutIdleSec= is rounded up to one second if that directive is set to 0. Fix this by bailing early in automount_enter_runnning() in case no timeout is requested.
This commit is contained in:
parent
a60d828052
commit
93a3b53b2b
@ -672,6 +672,9 @@ static int automount_start_expire(Automount *a) {
|
||||
|
||||
assert(a);
|
||||
|
||||
if (a->timeout_idle_usec == 0)
|
||||
return 0;
|
||||
|
||||
timeout = now(CLOCK_MONOTONIC) + MAX(a->timeout_idle_usec/3, USEC_PER_SEC);
|
||||
|
||||
if (a->expire_event_source) {
|
||||
|
Loading…
Reference in New Issue
Block a user