From 5521b73afee6443dc187e46a852b47cdecfc4831 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Mon, 31 Jan 2011 19:15:16 -0700 Subject: [PATCH] Fix external_acl_type grace= option Due to race conditions between concurrent requests this is still not a complete fix. But reduces the unwanted re-use of helper responses from all connections arriving in a whole second which match the ACL key down to just those that arrive within the reply lag time of the helper. The grace option has a resolution of 1 second. --- src/external_acl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/external_acl.cc b/src/external_acl.cc index def991913a..ac4e31f524 100644 --- a/src/external_acl.cc +++ b/src/external_acl.cc @@ -1051,7 +1051,7 @@ external_acl_grace_expired(external_acl * def, external_acl_entry * entry) ttl = entry->result == 1 ? def->ttl : def->negative_ttl; ttl = (ttl * (100 - def->grace)) / 100; - if (entry->date + ttl < squid_curtime) + if (entry->date + ttl <= squid_curtime) return 1; else return 0; -- 2.47.2