]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
handle COMM_ERR_CLOSING in the comm_accept() callbacks correctly.
authoradrian <>
Tue, 15 Oct 2002 07:00:22 +0000 (07:00 +0000)
committeradrian <>
Tue, 15 Oct 2002 07:00:22 +0000 (07:00 +0000)
src/client_side.cc
src/ftp.cc

index 42f2dc7fb74f270887c22b1cdd1e9063ca199801..3e3445a1615fdc91d773910ac44a9f48b2cdb811 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.601 2002/10/14 10:52:05 adrian Exp $
+ * $Id: client_side.cc,v 1.602 2002/10/15 01:00:22 adrian Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -1791,6 +1791,11 @@ httpAccept(int sock, int newfd, struct sockaddr_in *me, struct sockaddr_in *peer
 #if USE_IDENT
     static aclCheck_t identChecklist;
 #endif
+
+    if (flag == COMM_ERR_CLOSING) {
+        return;
+    }
+
     /* kick off another one for later */
     comm_accept(sock, httpAccept, NULL);
 
@@ -1887,6 +1892,10 @@ httpsAccept(int sock, int newfd, struct sockaddr_in *me, struct sockaddr_in *pee
     static aclCheck_t identChecklist;
 #endif
 
+    if (flag == COMM_ERR_CLOSING) {
+        return;
+    }
+
     if (flag != COMM_OK) {
        errno = xerrno;
        debug(50, 1) ("httpsAccept: FD %d: accept failure: %s\n",
index 51004cd0d4fae05e4396c7606179c460398755a6..a1d29e9b1191b696dd37007079942b325cb6af81 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ftp.cc,v 1.334 2002/10/14 11:09:26 adrian Exp $
+ * $Id: ftp.cc,v 1.335 2002/10/15 01:00:22 adrian Exp $
  *
  * DEBUG: section 9     File Transfer Protocol (FTP)
  * AUTHOR: Harvest Derived
@@ -1897,6 +1897,10 @@ ftpAcceptDataConnection(int fd, int newfd, struct sockaddr_in *me, struct sockad
     FtpStateData *ftpState = (FtpStateData *)data;
     debug(9, 3) ("ftpAcceptDataConnection\n");
 
+    if (flag == COMM_ERR_CLOSING) {
+        return;
+    }
+
     if (EBIT_TEST(ftpState->entry->flags, ENTRY_ABORTED)) {
        comm_close(ftpState->ctrl.fd);
        return;