]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
temp hack until we get this bug buggered
authorwessels <>
Fri, 22 Jan 1999 11:18:47 +0000 (11:18 +0000)
committerwessels <>
Fri, 22 Jan 1999 11:18:47 +0000 (11:18 +0000)
src/ftp.cc

index 069c93d922b89bb071b46441c4ada17e8272960e..62858eb0661878092de714988e35d5a9ccf0176b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ftp.cc,v 1.274 1999/01/22 03:36:55 wessels Exp $
+ * $Id: ftp.cc,v 1.275 1999/01/22 04:18:47 wessels Exp $
  *
  * DEBUG: section 9     File Transfer Protocol (FTP)
  * AUTHOR: Harvest Derived
@@ -286,8 +286,14 @@ ftpStateFree(int fdnotused, void *data)
     safe_free(ftpState->filepath);
     safe_free(ftpState->data.host);
     if (ftpState->data.fd > -1) {
-       comm_close(ftpState->data.fd);
-       ftpState->data.fd = -1;
+       if (fd_table[ftpState->data.fd].flags.open) {
+           comm_close(ftpState->data.fd);
+           ftpState->data.fd = -1;
+       } else {
+           debug(9,1)("ftpStateFree: data FD %d somehow got closed\n",
+               ftpState->data.fd);
+           ftpState->data.fd = -1;
+       }
     }
     cbdataFree(ftpState);
 }