From: Amos Jeffries Date: Tue, 1 Feb 2011 02:15:16 +0000 (-0700) Subject: Fix external_acl_type grace= option X-Git-Tag: SQUID_3_1_11~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5521b73afee6443dc187e46a852b47cdecfc4831;p=thirdparty%2Fsquid.git 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. --- 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;