From: wessels <> Date: Thu, 17 Jun 1999 04:10:36 +0000 (+0000) Subject: Added maximum_icp_query_timeout option because John Line sometimes X-Git-Tag: SQUID_3_0_PRE1~2153 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28993292cac685b1ec7588e0f1b0b8d2c0dd6dbe;p=thirdparty%2Fsquid.git Added maximum_icp_query_timeout option because John Line sometimes sees dynamic query timeouts in the range of 6-7 seconds. --- diff --git a/src/cf.data.pre b/src/cf.data.pre index 5aaead814c..9afafce6ad 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -1,6 +1,6 @@ # -# $Id: cf.data.pre,v 1.156 1999/06/16 21:23:31 wessels Exp $ +# $Id: cf.data.pre,v 1.157 1999/06/16 22:10:36 wessels Exp $ # # # SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -355,6 +355,20 @@ DOC_START icp_query_timeout 0 DOC_END +NAME: maximum_icp_query_timeout +COMMENT: (msec) +DEFAULT: 2000 +TYPE: int +LOC: Config.Timeout.icp_query_max +DOC_START + When you use the dynamic ICP query timeout (by setting + 'icp_query_timeout' to zero) you might want to place an + upper limit on the timeout value. + + If 'icp_query_timeout' is set to zero, this value is ignored. +icp_query_timeout 2000 +DOC_END + NAME: mcast_icp_query_timeout COMMENT: (msec) DEFAULT: 2000 diff --git a/src/neighbors.cc b/src/neighbors.cc index bc84c7b9bd..30307afa9a 100644 --- a/src/neighbors.cc +++ b/src/neighbors.cc @@ -1,6 +1,6 @@ /* - * $Id: neighbors.cc,v 1.274 1999/05/11 18:45:46 wessels Exp $ + * $Id: neighbors.cc,v 1.275 1999/06/16 22:10:40 wessels Exp $ * * DEBUG: section 15 Neighbor Routines * AUTHOR: Harvest Derived @@ -506,10 +506,15 @@ neighborsUdpPing(request_t * request, */ if (Config.Timeout.icp_query) *timeout = Config.Timeout.icp_query; - else if (*exprep > 0) - (*timeout) = 2 * (*timeout) / (*exprep); - else - *timeout = 2000; /* 2 seconds */ + else { + if (*exprep > 0) + (*timeout) = 2 * (*timeout) / (*exprep); + else + *timeout = 2000; /* 2 seconds */ + if (Config.Timeout.icp_query_max) + if (*timeout > Config.Timeout.icp_query_max) + *timeout = Config.Timeout.icp_query_max; + } return peers_pinged; } diff --git a/src/structs.h b/src/structs.h index 69ac4973f1..9bf37a562a 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1,6 +1,6 @@ /* - * $Id: structs.h,v 1.298 1999/06/16 21:23:34 wessels Exp $ + * $Id: structs.h,v 1.299 1999/06/16 22:10:43 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -246,6 +246,7 @@ struct _SquidConfig { time_t siteSelect; time_t deadPeer; int icp_query; /* msec */ + int icp_query_max; /* msec */ int mcast_icp_query; /* msec */ #if USE_IDENT time_t ident;