<tag>cache_mem</tag>
<p>Default size increased to 256MB.
- <tag>cache_peer htcp-no-clr htcp-no-purge-clr htcp-only-clr htcp-forward-clr connection-auth[=on|off|auto]</tag>
+ <tag>cache_peer htcp-no-clr htcp-no-purge-clr htcp-only-clr htcp-forward-clr connection-auth[=on|off|auto] connect-fail-limit=N</tag>
<p>New Options.
<verb>
use 'htcp-no-clr' to send HTCP to the neighbor but without
and any such challenges received from there should be
ignored. Default is 'auto' to automatically determine the
status of the peer.
+
+ use 'connect-fail-limit=nn' to specify how many times
+ connecting to a peer must fail before it is marked as
+ down. Default is 10.
</verb>
<tag>cache_store_log</tag>
rfc1738_unescape(p->login);
} else if (!strncasecmp(token, "connect-timeout=", 16)) {
p->connect_timeout = xatoi(token + 16);
+ } else if (!strncasecmp(token, "connect-fail-limit=", 19)) {
+ p->connect_fail_limit = xatoi(token + 19);
#if USE_CACHE_DIGESTS
-
} else if (!strncasecmp(token, "digest-url=", 11)) {
p->digest_url = xstrdup(token + 11);
#endif
if (p->weight < 1)
p->weight = 1;
+ if (p->connect_fail_limit < 1)
+ p->connect_fail_limit = 1;
+
p->icp.version = ICP_VERSION_CURRENT;
p->test_fd = -1;
no-delay
login=user:password | PASS | *:password
connect-timeout=nn
+ connect-fail-limit=nn
digest-url=url
allow-miss
max-conn=n
specific connect timeout (also see the
peer_connect_timeout directive)
+ use 'connect-fail-limit=nn' to specify how many times
+ connecting to a peer must fail before it is marked as
+ down. Default is 10.
+
use 'digest-url=url' to tell Squid to fetch the cache
digest (if digests are enabled) for this host from
the specified URL rather than the Squid default
return;
}
- p->tcp_up = PEER_TCP_MAGIC_COUNT;
+ p->tcp_up = p->connect_fail_limit;
for (j = 0; j < (int) ia->count && j < PEER_MAX_ADDRESSES; j++) {
p->addresses[j] = ia->in_addrs[j];
{
if (!p->tcp_up) {
debugs(15, 2, "TCP connection to " << p->host << "/" << p->http_port << " succeded");
- p->tcp_up = PEER_TCP_MAGIC_COUNT; // NP: so peerAlive(p) works properly.
+ p->tcp_up = p->connect_fail_limit; // NP: so peerAlive(p) works properly.
peerAlive(p);
if (!p->n_addresses)
ipcache_nbgethostbyname(p->host, peerDNSConfigure, p);
} else
- p->tcp_up = PEER_TCP_MAGIC_COUNT;
+ p->tcp_up = p->connect_fail_limit;
}
/// called by Comm when test_fd is closed while connect is in progress
if (p->connect_timeout > 0)
storeAppendPrintf(sentry, " connect-timeout=%d", (int) p->connect_timeout);
+ if (p->connect_fail_limit != PEER_TCP_MAGIC_COUNT)
+ storeAppendPrintf(sentry, " connect-fail-limit=%d", p->connect_fail_limit);
+
#if USE_CACHE_DIGESTS
if (p->digest_url)
char *login; /* Proxy authorization */
time_t connect_timeout;
+ int connect_fail_limit;
int max_conn;
char *domain; /* Forced domain */
#if USE_SSL