summaryrefslogtreecommitdiffstats
path: root/watchdog.cpp
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2017-08-11 15:23:17 -0700
committerPatrick Venture <venture@google.com>2017-08-23 19:07:46 +0000
commit09eebe3e62bfb58db890ec36d4447b9c80895c07 (patch)
tree47fbdda09a8dcb93a7c5c97c2f546cb85958bb24 /watchdog.cpp
parent50c30945b8195344da1b38bfc62dcb790f0eb29e (diff)
downloadphosphor-watchdog-09eebe3e62bfb58db890ec36d4447b9c80895c07.tar.gz
phosphor-watchdog-09eebe3e62bfb58db890ec36d4447b9c80895c07.zip
Add option for daemon to continue running after timeout
Added new command line option that lets someone disable the watchdog timer on timer expiration instead of the default action of it exiting. Change-Id: I1c3414d4378872860ac083836cda4809fa26237a Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'watchdog.cpp')
-rw-r--r--watchdog.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/watchdog.cpp b/watchdog.cpp
index de90567..0c93d31 100644
--- a/watchdog.cpp
+++ b/watchdog.cpp
@@ -36,6 +36,7 @@ bool Watchdog::enabled(bool value)
else
{
timer.setEnabled<std::false_type>();
+ timer.clearExpired();
log<level::INFO>("watchdog: disabled");
}
}
OpenPOWER on IntegriCloud