29 return conn !=
nullptr && conn->
isOpen();
36 debugs(5, 5,
"closing orphan: " << *
this);
38 static uint64_t losses = 0;
40 debugs(5, 4,
"BUG #3329: Lost orphan #" << losses <<
": " << *
this);
63 c.setAddrs(local, remote);
64 c.peerType = peerType;
68 c.nfConnmark = nfConnmark;
70 c.flags = flags & ~COMM_ORPHANED;
76 c.remoteEui48 = remoteEui48;
77 c.remoteEui64 = remoteEui64;
85 debugs(5, 5,
this <<
" made " << c);
144 return min(lifeTimeLeft, idleTimeout);
170 const time_t ftimeout = fwdTimeLeft ? fwdTimeLeft : 5;
172 return min(ctimeout, ftimeout);
191 os <<
" local=" << conn.
local;
193 os <<
" remote=" << conn.
remote;
197 os <<
" FD " << conn.
fd;
199 os <<
" flags=" << conn.
flags;
#define COMM_ORPHANED
not registered with Comm and not owned by any connection-closing code
#define InstanceIdDefinitions(...)
convenience macro to instantiate Class-specific stuff in .cc files
int cbdataReferenceValid(const void *p)
#define cbdataReferenceDone(var)
#define cbdataReference(var)
time_t connectTimeout() const
InstanceId< Connection, uint64_t > id
time_t timeLeft(const time_t idleTimeout) const
CachePeer * getPeer() const
std::ostream & detailCodeContext(std::ostream &os) const override
appends human-friendly context description line(s) to a cache.log record
Security::NegotiationHistory * tlsHistory
bool toGoneCachePeer() const
whether this is a connection to a cache_peer that was removed during reconfiguration
time_t connectTimeout(const time_t fwdStart) const
Security::NegotiationHistory * tlsNegotiations()
ConnectionPointer cloneProfile() const
Create a new closed Connection with the same configuration as this one.
ScopedId codeContextGist() const override
void setPeer(CachePeer *p)
static std::ostream & Extra(std::ostream &)
static time_t ForwardTimeout(const time_t fwdStart)
time left to finish the whole forwarding process (which started at fwdStart)
unsigned short port() const
struct SquidConfig::@77 Timeout
time_t pconnLifetime
pconn_lifetime in squid.conf
bool isOpen(const int fd)
A const & min(A const &lhs, A const &rhs)
#define debugs(SECTION, LEVEL, CONTENT)
const char * hier_code_str[]
std::ostream & operator<<(std::ostream &, const Connection &)
bool IsConnOpen(const Comm::ConnectionPointer &conn)
void peerConnClosed(CachePeer *p)
Notifies peer of an associated connection closure.