Browse Source

[mod_lua] fix ttl handling for lua.handler

personal/stbuehler/wip
Stefan Bühler 9 years ago
parent
commit
ff527c560c
  1. 4
      src/modules/mod_lua.c

4
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;
}

Loading…
Cancel
Save