ConnStateData::terminateAll(const Error &error, const LogTagsErrors &lte)
{
    debugs(33, 3, pipeline.count() << '/' << pipeline.nrequests << " after " << error);

    if (pipeline.empty()) {
        bareError.update(error); // XXX: bareLogTagsErrors
    } else {
        // We terminate the current CONNECT/PUT/etc. context below, logging any
        // error details, but that context may leave unparsed bytes behind.
        // Consume them to stop checkLogging() from logging them again later.
        const auto intputToConsume =
#if USE_OPENSSL
            parsingTlsHandshake ? "TLS handshake" : // more specific than CONNECT
#endif
            bodyPipe ? "HTTP request body" :
            pipeline.back()->mayUseConnection() ? "HTTP CONNECT" :
            nullptr;

        while (const auto context = pipeline.front()) {
            context->noteIoError(error, lte);
            context->finished(); // cleanup and self-deregister
            assert(context != pipeline.front());
        }

        if (intputToConsume && !inBuf.isEmpty()) {
            debugs(83, 5, "forgetting client " << intputToConsume << " bytes: " << inBuf.length());
            inBuf.clear();
        }
    }

    clientConnection->close();
}
ConnStateData::terminateAll(const Error &error, const LogTagsErrors &lte)
{
    debugs(33, 3, pipeline.count() << '/' << pipeline.nrequests << " after " << error);

    if (pipeline.empty()) {
        bareError.update(error);  
    } else {
         
         
         
        const auto intputToConsume =
#if USE_OPENSSL
            parsingTlsHandshake ? "TLS handshake" :  
#endif
            bodyPipe ? "HTTP request body" :
            pipeline.back()->mayUseConnection() ? "HTTP CONNECT" :
            nullptr;

        while (const auto context = pipeline.front()) {
            context->noteIoError(error, lte);
            context->finished();  
            assert(context != pipeline.front());
        }

        if (intputToConsume && !inBuf.isEmpty()) {
            debugs(83, 5, "forgetting client " << intputToConsume << " bytes: " << inBuf.length());
            inBuf.clear();
        }
    }

    clientConnection->close();
}