From: Amos Jeffries Date: Tue, 25 Jan 2011 05:31:59 +0000 (+1300) Subject: Fix external_acl_type grace= option X-Git-Tag: take03^2~65 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2e1359a022ae1be3654086bcebc8c5141564632e;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 9131b8b733..aef2541101 100644 --- a/src/external_acl.cc +++ b/src/external_acl.cc @@ -1104,7 +1104,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;