]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix Squid Assertion comm.cc:759: "Comm::IsConnOpen(conn)"
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Wed, 3 Jun 2015 10:42:08 +0000 (13:42 +0300)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Wed, 3 Jun 2015 10:42:08 +0000 (13:42 +0300)
This is a squid Assertion inside ConnStateData::getSslContextDone while setting timeout. The reason is that the ConnStateData::clientConnection connection may
closed while waiting response from ssl_crtd helper.

This is a Measurement Factory project

src/client_side.cc
src/ssl/support.cc

index 8ba88387c5ed07360077d499e7cb4ebd971b6208..b860b64d59ef1cff40c88ec0587e39977b543261 100644 (file)
@@ -3816,6 +3816,11 @@ ConnStateData::sslCrtdHandleReplyWrapper(void *data, const Helper::Reply &reply)
 void
 ConnStateData::sslCrtdHandleReply(const Helper::Reply &reply)
 {
+    if (!isOpen()) {
+        debugs(33, 3, "Connection gone while waiting for ssl_crtd helper reply; helper reply:" << reply);
+        return;
+    }
+
     if (reply.result == Helper::BrokenHelper) {
         debugs(33, 5, HERE << "Certificate for " << sslConnectHostOrIp << " cannot be generated. ssl_crtd response: " << reply);
     } else if (!reply.other().hasContent()) {
index bec1ddb82e41f81b3a9ff46462a41a13be00dc00..c8a161bb207b195e148d263282e77af927b75cdf 100644 (file)
@@ -1606,6 +1606,11 @@ bool Ssl::generateUntrustedCert(X509_Pointer &untrustedCert, EVP_PKEY_Pointer &u
 SSL *
 SslCreate(SSL_CTX *sslContext, const int fd, Ssl::Bio::Type type, const char *squidCtx)
 {
+    if (fd < 0) {
+        debugs(83, DBG_IMPORTANT, "Gone connection");
+        return NULL;
+    }
+
     const char *errAction = NULL;
     int errCode = 0;
     if (SSL *ssl = SSL_new(sslContext)) {