From 43af4d2742de39465cb17bcfda2c7799bf6837e5 Mon Sep 17 00:00:00 2001 From: hno <> Date: Sun, 7 Apr 2002 09:35:30 +0000 Subject: [PATCH] Bugzilla #293: Request for a icp_query_timeout_min option --- src/cf.data.pre | 17 ++++++++++++++++- src/neighbors.cc | 4 +++- src/structs.h | 3 ++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/cf.data.pre b/src/cf.data.pre index 2e94e98957..290a00db2c 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -1,6 +1,6 @@ # -# $Id: cf.data.pre,v 1.254 2002/04/05 08:55:22 hno Exp $ +# $Id: cf.data.pre,v 1.255 2002/04/07 03:35:30 hno Exp $ # # # SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -451,6 +451,21 @@ DOC_START 'icp_query_timeout' directive. DOC_END +NAME: minimum_icp_query_timeout +COMMENT: (msec) +DEFAULT: 5 +TYPE: int +LOC: Config.Timeout.icp_query_max +DOC_START + Normally the ICP query timeout is determined dynamically. But + sometimes it can lead to very small timeouts, even lower than + the normal latency variance on your link due to traffic. + Use this option to put an lower limit on the dynamic timeout + value. Do NOT use this option to always use a fixed (instead + of a dynamic) timeout value. To set a fixed timeout see the + 'icp_query_timeout' directive. +DOC_END + NAME: mcast_icp_query_timeout COMMENT: (msec) DEFAULT: 2000 diff --git a/src/neighbors.cc b/src/neighbors.cc index b23f15dd15..8d5772c855 100644 --- a/src/neighbors.cc +++ b/src/neighbors.cc @@ -1,6 +1,6 @@ /* - * $Id: neighbors.cc,v 1.299 2001/10/17 20:25:02 hno Exp $ + * $Id: neighbors.cc,v 1.300 2002/04/07 03:35:30 hno Exp $ * * DEBUG: section 15 Neighbor Routines * AUTHOR: Harvest Derived @@ -561,6 +561,8 @@ neighborsUdpPing(request_t * request, if (Config.Timeout.icp_query_max) if (*timeout > Config.Timeout.icp_query_max) *timeout = Config.Timeout.icp_query_max; + if (*timeout < Config.Timeout.icp_query_min) + *timeout = Config.Timeout.icp_query_min; } return peers_pinged; } diff --git a/src/structs.h b/src/structs.h index e75a446fe8..2b4b7cfa8b 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1,6 +1,6 @@ /* - * $Id: structs.h,v 1.414 2002/04/06 08:49:28 adrian Exp $ + * $Id: structs.h,v 1.415 2002/04/07 03:35:30 hno Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -403,6 +403,7 @@ struct _SquidConfig { time_t deadPeer; int icp_query; /* msec */ int icp_query_max; /* msec */ + int icp_query_min; /* msec */ int mcast_icp_query; /* msec */ #if USE_IDENT time_t ident; -- 2.47.2