]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Added maximum_icp_query_timeout option because John Line sometimes
authorwessels <>
Thu, 17 Jun 1999 04:10:36 +0000 (04:10 +0000)
committerwessels <>
Thu, 17 Jun 1999 04:10:36 +0000 (04:10 +0000)
sees dynamic query timeouts in the range of 6-7 seconds.

src/cf.data.pre
src/neighbors.cc
src/structs.h

index 5aaead814c6a8a2384a9ac2d6ecf228a8e7cfb2d..9afafce6ad11fba0f8d831595a6fdeac0f4c2d11 100644 (file)
@@ -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
index bc84c7b9bd1dd58f7138fb92f331e308c6bb0fee..30307afa9a159b8b99b04bb84d552da7d085d550 100644 (file)
@@ -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;
 }
 
index 69ac4973f19691c374d3504fbd987a837bcd5805..9bf37a562ab4e42d869930b8e52225a8fdf6c314 100644 (file)
@@ -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;