From a2330c9d592a3448433aa0954865f11d002e20eb Mon Sep 17 00:00:00 2001 From: Christos Tsantilas Date: Sat, 13 Feb 2016 19:24:27 +1300 Subject: [PATCH] Bug 4437: Fix Segfault on Certain SSL Handshake Errors Squid after an unsuccesfull try to connect to the remote server may make two concurrent retries to connect to the remote SSL server, calling twice the FwdState::retryOrBail() method, which may result to unexpected behaviour. Prevent this by just closing the connection to the remote SSL server inside FwdState::connectedToPeer method on error and instead of calling the FwdState::retryOrBail method, just allow comm_close handler to retry the connection if required. This is a Measurement Factory project --- src/FwdState.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FwdState.cc b/src/FwdState.cc index 2b62c7dc73..97b1277573 100644 --- a/src/FwdState.cc +++ b/src/FwdState.cc @@ -719,7 +719,7 @@ FwdState::connectedToPeer(Ssl::PeerConnectorAnswer &answer) answer.error.clear(); // preserve error for errorSendComplete() if (CachePeer *p = serverConnection()->getPeer()) peerConnectFailed(p); - retryOrBail(); + serverConnection()->close(); return; } -- 2.47.2