Commit d6bc813c authored by Poul-Henning Kamp's avatar Poul-Henning Kamp Committed by Tollef Fog Heen

Fix ttl when backend fetches are salvaged into transient storage.

Submitted by:	Martin
Fixes		#1140
parent 79db58ac
......@@ -788,12 +788,12 @@ cnt_fetchbody(struct sess *sp)
* Try to salvage the transaction by allocating a
* shortlived object on Transient storage.
*/
sp->obj = STV_NewObject(sp, TRANSIENT_STORAGE, l,
&sp->wrk->exp, nhttp);
if (sp->wrk->exp.ttl > params->shortlived)
sp->wrk->exp.ttl = params->shortlived;
sp->wrk->exp.grace = 0.0;
sp->wrk->exp.keep = 0.0;
sp->obj = STV_NewObject(sp, TRANSIENT_STORAGE, l,
&sp->wrk->exp, nhttp);
}
if (sp->obj == NULL) {
sp->err_code = 503;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment