If you didn't specify any configuration (i.e. nil), the stats module
wouldn't get loaded even though the defaults need it to work.
Now we don't skip that part and pass whole .config() even on nil config.
+Knot Resolver 3.x.y (2019-0m-dd)
+================================
+
+Bugfixes
+--------
+- predict module: load stats module if config didn't specify period (!755)
+
+
Knot Resolver 3.2.1 (2019-01-10)
================================
function predict.config(config)
-- Reconfigure
- if type(config) ~= 'table' then return end
+ config = config or {}
+ if type(config) ~= 'table' then
+ error('[predict] configuration must be a table or nil')
+ end
if config.window then predict.window = config.window end
if config.period then predict.period = config.period end
-- Load dependent modules
-- setup resolver
-modules = { 'predict', 'stats' }
+modules = { 'predict' }
-- mock global functions
local resolve_count = 0