/*
- * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
* period. The larger the number of requests between cycled resets the
* more balanced the operations.
*
- \param data unused.
- \todo Make the reset timing a selectable parameter in squid.conf
+ * \param data unused
+ *
+ * TODO: Make the reset timing a selectable parameter in squid.conf
*/
static void
peerClearRRLoop(void *data)
return 1;
}
-/// \returns the effective connect timeout for this peer
-time_t
-peerConnectTimeout(const CachePeer *peer)
-{
- return peer->connect_timeout_raw > 0 ?
- peer->connect_timeout_raw : Config.Timeout.peer_connect;
-}
-
time_t
positiveTimeout(const time_t timeout)
{
}
p->reprobe = false;
- const time_t ctimeout = peerConnectTimeout(p);
+ const auto ctimeout = p->connectTimeout();
/* for each IP address of this CachePeer. find one that we can connect to and probe it. */
for (int i = 0; i < p->n_addresses; ++i) {
Comm::ConnectionPointer conn = new Comm::Connection;