Skip to content
Browse files

Fix ttl when backend fetches are salvaged into transient storage.

Submitted by:	Martin
Fixes		#1140
  • Loading branch information...
1 parent 79db58a commit d6bc813c8e08d7aaa20e27d52cf330d0548c7e9b @bsdphk bsdphk committed with Tollef Fog Heen May 21, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 bin/varnishd/cache_center.c
View
4 bin/varnishd/cache_center.c
@@ -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;

0 comments on commit d6bc813

Please sign in to comment.
Something went wrong with that request. Please try again.