From: Vladimír Čunát Date: Thu, 22 Dec 2022 12:58:53 +0000 (+0100) Subject: predict: fully deactivate prediction with `period = 0` X-Git-Tag: v5.6.0~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89b41a7af878be720fa0f19f70051eb6232a068b;p=thirdparty%2Fknot-resolver.git predict: fully deactivate prediction with `period = 0` That setting is recommended by documentation but it would still leave the timer triggering repeatedly. Maybe it didn't cause any practical difference, but it was unnecessary and possibly confusing. --- diff --git a/modules/predict/predict.lua b/modules/predict/predict.lua index 4511fc9b9..0117fd521 100644 --- a/modules/predict/predict.lua +++ b/modules/predict/predict.lua @@ -140,7 +140,7 @@ function predict.process() end function predict.init() - if predict.window > 0 then + if predict.window > 0 and predict.period > 0 then predict.current_epoch = predict.epoch() predict.ev_sample = event.after(next_event(), predict.process) end