From: adrian <> Date: Tue, 15 Oct 2002 07:00:22 +0000 (+0000) Subject: handle COMM_ERR_CLOSING in the comm_accept() callbacks correctly. X-Git-Tag: SQUID_3_0_PRE1~643 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=02d1422b752b3cc2f13355cc093fc8160b0a0a55;p=thirdparty%2Fsquid.git handle COMM_ERR_CLOSING in the comm_accept() callbacks correctly. --- diff --git a/src/client_side.cc b/src/client_side.cc index 42f2dc7fb7..3e3445a161 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -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", diff --git a/src/ftp.cc b/src/ftp.cc index 51004cd0d4..a1d29e9b11 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -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;