Software /
code /
prosody
Changeset
12547:e79c64b2dfed
util.watchdog: Allow passing a new timeout to :reset()
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 11 Jun 2022 22:15:31 +0100 |
parents | 12546:e78b35574aae |
children | 12548:5133d6e48686 |
files | util/watchdog.lua |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util/watchdog.lua Sat Jun 11 22:15:14 2022 +0100 +++ b/util/watchdog.lua Sat Jun 11 22:15:31 2022 +0100 @@ -19,7 +19,10 @@ return watchdog; end -function watchdog_methods:reset() +function watchdog_methods:reset(new_timeout) + if new_timeout then + self.timeout = new_timeout; + end if self.timer_id then timer.reschedule(self.timer_id, self.timeout+1); else