]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bugzilla #446:
authorhno <>
Thu, 5 Dec 2002 22:02:24 +0000 (22:02 +0000)
committerhno <>
Thu, 5 Dec 2002 22:02:24 +0000 (22:02 +0000)
Possible fix for a CONNECT related F->flags.open assertion failure
on stalled/timedout CONNECT requests.

src/ssl.cc
src/tunnel.cc

index 85576106f725cdfa9d2f403faf9f299178162ee6..dc7e8b55cf5509165244593c1e07d1f1749fc67b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ssl.cc,v 1.130 2002/10/21 15:18:32 adrian Exp $
+ * $Id: ssl.cc,v 1.131 2002/12/05 15:02:24 hno Exp $
  *
  * DEBUG: section 26    Secure Sockets Layer Proxy
  * AUTHOR: Duane Wessels
@@ -300,10 +300,13 @@ sslTimeout(int fd, void *data)
 {
     SslStateData *sslState = (SslStateData *)data;
     debug(26, 3) ("sslTimeout: FD %d\n", fd);
+    /* Temporary lock to protect our own feets (comm_close -> sslClientClosed -> Free) */
+    cbdataInternalLock(sslState);
     if (sslState->client.fd > -1)
        comm_close(sslState->client.fd);
     if (sslState->server.fd > -1)
        comm_close(sslState->server.fd);
+    cbdataInternalUnlock(sslState);
 }
 
 static void
index abda9a88ca7fd41c51907fad1eadf8d0e8cecfef..a549e5d318fb3cb9e6566e44f160ac0bce7b187a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: tunnel.cc,v 1.130 2002/10/21 15:18:32 adrian Exp $
+ * $Id: tunnel.cc,v 1.131 2002/12/05 15:02:24 hno Exp $
  *
  * DEBUG: section 26    Secure Sockets Layer Proxy
  * AUTHOR: Duane Wessels
@@ -300,10 +300,13 @@ sslTimeout(int fd, void *data)
 {
     SslStateData *sslState = (SslStateData *)data;
     debug(26, 3) ("sslTimeout: FD %d\n", fd);
+    /* Temporary lock to protect our own feets (comm_close -> sslClientClosed -> Free) */
+    cbdataInternalLock(sslState);
     if (sslState->client.fd > -1)
        comm_close(sslState->client.fd);
     if (sslState->server.fd > -1)
        comm_close(sslState->server.fd);
+    cbdataInternalUnlock(sslState);
 }
 
 static void