[4.0] bbfbef6 Be more accurate when computing client RX_TIMEOUT.
Lasse Karstensen
lkarsten at varnish-software.com
Wed Feb 11 15:08:46 CET 2015
commit bbfbef651744d9749a3a818c588aa1a1277f5b91
Author: Lasse Karstensen <lkarsten at varnish-software.com>
Date: Wed Feb 11 15:01:05 2015 +0100
Be more accurate when computing client RX_TIMEOUT.
This a backport of f9aa6281f5194ed27cfa4c7ad7ce50cdb8f9bf1c in master.
Fixes #1665.
diff --git a/bin/varnishd/cache/cache_http1_fsm.c b/bin/varnishd/cache/cache_http1_fsm.c
index 2934181..b398dc2 100644
--- a/bin/varnishd/cache/cache_http1_fsm.c
+++ b/bin/varnishd/cache/cache_http1_fsm.c
@@ -154,7 +154,7 @@ http1_wait(struct sess *sp, struct worker *wrk, struct req *req)
if (isnan(req->t_first))
/* Record first byte received time stamp */
req->t_first = now;
- when = sp->t_idle + cache_param->timeout_req;
+ when = req->t_first + cache_param->timeout_req;
tmo = (int)(1e3 * (when - now));
if (when < now || tmo == 0) {
why = SC_RX_TIMEOUT;
More information about the varnish-commit
mailing list