From: Amos Jeffries Date: Tue, 17 Nov 2015 10:14:15 +0000 (-0800) Subject: Prevent all TUNNELs being marked as ABORTED X-Git-Tag: SQUID_4_0_3~5^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1326d9800997f45fe52458bc0c2ff232e8b23890;p=thirdparty%2Fsquid.git Prevent all TUNNELs being marked as ABORTED TUNNEL transactions are naturally ended by one of the client or server closing the connection. This is not an abort. So finish the CONNECT message context cleanly when the tunnel is closed. --- diff --git a/src/tunnel.cc b/src/tunnel.cc index 35a6f9f1c4..8a160f1e65 100644 --- a/src/tunnel.cc +++ b/src/tunnel.cc @@ -242,6 +242,10 @@ tunnelServerClosed(const CommCloseCbParams ¶ms) tunnelState->request->hier.stopPeerClock(false); if (tunnelState->noConnections()) { + // ConnStateData pipeline should contain the CONNECT we are performing + auto ctx = tunnelState->http->getConn()->pipeline.front(); + if (ctx != nullptr) + ctx->finished(); delete tunnelState; return; } @@ -261,6 +265,10 @@ tunnelClientClosed(const CommCloseCbParams ¶ms) tunnelState->client.writer = NULL; if (tunnelState->noConnections()) { + // ConnStateData pipeline should contain the CONNECT we are performing + auto ctx = tunnelState->http->getConn()->pipeline.front(); + if (ctx != nullptr) + ctx->finished(); delete tunnelState; return; }