From: Eduard Bagdasaryan Date: Sun, 15 Aug 2021 10:02:58 +0000 (+0300) Subject: Merge remote-tracking branch 'official/master' X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0a7432a;p=thirdparty%2Fsquid.git Merge remote-tracking branch 'official/master' into SQUID-568-premature-serverconn-use --- 0a7432ad0c3af8d9862d000fa22f4b540765ae61 diff --cc src/clients/HttpTunneler.cc index 20c247c31a,0c5e98d8f9..7145786607 --- a/src/clients/HttpTunneler.cc +++ b/src/clients/HttpTunneler.cc @@@ -98,14 -98,9 +98,14 @@@ Http::Tunneler::start( } void - Http::Tunneler::handleConnectionClosure(const CommCloseCbParams ¶ms) + Http::Tunneler::handleConnectionClosure(const CommCloseCbParams &) { closer = nullptr; + if (connection) { + countFailingConnection(); + connection->noteClosure(); + connection = nullptr; + } bailWith(new ErrorState(ERR_CONNECT_FAIL, Http::scBadGateway, request.getRaw(), al)); } diff --cc src/ssl/PeekingPeerConnector.cc index 5fe335c737,39d032810b..4df73bac0f --- a/src/ssl/PeekingPeerConnector.cc +++ b/src/ssl/PeekingPeerConnector.cc @@@ -24,10 -25,8 +25,8 @@@ CBDATA_NAMESPACED_CLASS_INIT(Ssl, PeekingPeerConnector); - void switchToTunnel(HttpRequest *request, const Comm::ConnectionPointer &clientConn, const Comm::ConnectionPointer &srvConn, const SBuf &preReadServerData); - void -Ssl::PeekingPeerConnector::cbCheckForPeekAndSpliceDone(Acl::Answer answer, void *data) +Ssl::PeekingPeerConnector::cbCheckForPeekAndSpliceDone(const Acl::Answer aclAnswer, void *data) { Ssl::PeekingPeerConnector *peerConnect = (Ssl::PeekingPeerConnector *) data; // Use job calls to add done() checks and other job logic/protections. diff --cc src/tests/stub_libcomm.cc index 61c12e1d67,b73f0ec59a..555cb77d79 --- a/src/tests/stub_libcomm.cc +++ b/src/tests/stub_libcomm.cc @@@ -22,11 -22,11 +22,11 @@@ void Comm::AcceptLimiter::kick() STU #include "comm/Connection.h" Comm::Connection::Connection() STUB Comm::Connection::~Connection() STUB -Comm::ConnectionPointer Comm::Connection::cloneIdentDetails() const STUB_RETVAL(nullptr) -Comm::ConnectionPointer Comm::Connection::cloneDestinationDetails() const STUB_RETVAL(nullptr) +Comm::ConnectionPointer Comm::Connection::cloneProfile() const STUB_RETVAL(nullptr) void Comm::Connection::close() STUB +void Comm::Connection::noteClosure() STUB CachePeer * Comm::Connection::getPeer() const STUB_RETVAL(NULL) - void Comm::Connection::setPeer(CachePeer * p) STUB + void Comm::Connection::setPeer(CachePeer *) STUB ScopedId Comm::Connection::codeContextGist() const STUB_RETVAL(id.detach()) std::ostream &Comm::Connection::detailCodeContext(std::ostream &os) const STUB_RETVAL(os) InstanceIdDefinitions(Comm::Connection, "conn", uint64_t);