From 367ef8140d560db270e5d8458eb986590f6f93ef Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Tue, 12 Mar 2013 16:48:09 +0100 Subject: Update lanes.lua fix validation of with_timers config option: validator was accepting any non-boolean value --- src/lanes.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lanes.lua b/src/lanes.lua index 729116e..c1c641a 100644 --- a/src/lanes.lua +++ b/src/lanes.lua @@ -71,14 +71,18 @@ lanes.configure = function( _params) end, with_timers = function( _val) -- with_timers may be nil or boolean - return _val and type( _val) == "boolean" or true + if _val then + return type( _val) == "boolean" + else + return true -- _val is either false or nil + end end, on_state_create = function( _val) -- on_state_create may be nil or a function return _val and type( _val) == "function" or true end, shutdown_timeout = function( _val) - -- nb_keepers should be a number >= 0 + -- shutdown_timeout should be a number >= 0 return type( _val) == "number" and _val >= 0 end, track_lanes = function( _val) -- cgit v1.2.3-55-g6feb