diff options
author | Daniel Mack <github@zonque.org> | 2016-03-29 10:35:52 +0200 |
---|---|---|
committer | Daniel Mack <github@zonque.org> | 2016-03-29 10:35:52 +0200 |
commit | 9081e5ababbd6ecdc59cef58dd191857f8639961 (patch) | |
tree | 6d154fdfddb61212f26bc6c032d3cd3e41714284 | |
parent | 86a42315536d865bbde5d04414a9764090437cc0 (diff) | |
parent | 947292eef49546db1379cfdf3a63bf7396d4a835 (diff) |
Merge pull request #2907 from evverx/runtime-watchdog-infinity
core: RuntimeWatchdogSec=infinity disables the watchdog logic
-rw-r--r-- | src/core/main.c | 2 | ||||
-rw-r--r-- | src/core/manager.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/core/main.c b/src/core/main.c index 78701805ea..e4e025e34e 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1664,7 +1664,7 @@ int main(int argc, char *argv[]) { test_usr(); } - if (arg_running_as == MANAGER_SYSTEM && arg_runtime_watchdog > 0) + if (arg_running_as == MANAGER_SYSTEM && arg_runtime_watchdog > 0 && arg_runtime_watchdog != USEC_INFINITY) watchdog_set_timeout(&arg_runtime_watchdog); if (arg_timer_slack_nsec != NSEC_INFINITY) diff --git a/src/core/manager.c b/src/core/manager.c index f13e933578..26cb588e30 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -2016,7 +2016,7 @@ int manager_loop(Manager *m) { while (m->exit_code == MANAGER_OK) { usec_t wait_usec; - if (m->runtime_watchdog > 0 && m->running_as == MANAGER_SYSTEM) + if (m->runtime_watchdog > 0 && m->runtime_watchdog != USEC_INFINITY && m->running_as == MANAGER_SYSTEM) watchdog_ping(); if (!ratelimit_test(&rl)) { @@ -2041,7 +2041,7 @@ int manager_loop(Manager *m) { continue; /* Sleep for half the watchdog time */ - if (m->runtime_watchdog > 0 && m->running_as == MANAGER_SYSTEM) { + if (m->runtime_watchdog > 0 && m->runtime_watchdog != USEC_INFINITY && m->running_as == MANAGER_SYSTEM) { wait_usec = m->runtime_watchdog / 2; if (wait_usec <= 0) wait_usec = 1; |