diff --git a/lib/rsmp/proxy.rb b/lib/rsmp/proxy.rb index aed6c18..eb9fcee 100644 --- a/lib/rsmp/proxy.rb +++ b/lib/rsmp/proxy.rb @@ -222,6 +222,20 @@ def start_watchdog @watchdog_started = true end + def stop_watchdog + log "Stopping watchdog", level: :debug + @watchdog_started = false + end + + def with_watchdog_disabled + was = @watchdog_started + stop_watchdog if was + yield + ensure + start_watchdog if was + end + + def start_timer return if @timer name = "timer"