From ff527c560c01b5b37a4205e70272db39559d4621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BChler?= Date: Fri, 25 Jan 2013 10:00:25 +0100 Subject: [PATCH] [mod_lua] fix ttl handling for lua.handler --- src/modules/mod_lua.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/mod_lua.c b/src/modules/mod_lua.c index 3d7ed24..c2f353e 100644 --- a/src/modules/mod_lua.c +++ b/src/modules/mod_lua.c @@ -110,7 +110,7 @@ static liHandlerResult lua_handle(liVRequest *vr, gpointer param, gpointer *cont wc = &conf->worker_config[vr->wrk->ndx]; - if (wc->act) timeout = (conf->ttl > 0 && wc->ts_loaded + conf->ttl >= CUR_TS(vr->wrk)); + if (wc->act) timeout = (conf->ttl > 0 && wc->ts_loaded + conf->ttl < CUR_TS(vr->wrk)); if (!wc->act || timeout) { int err; @@ -127,8 +127,8 @@ static liHandlerResult lua_handle(liVRequest *vr, gpointer param, gpointer *cont break; } + wc->ts_loaded = CUR_TS(vr->wrk); if (timeout && st.st_mtime <= wc->ts_loaded) { - wc->ts_loaded = CUR_TS(vr->wrk); goto loaded; }