/*
- * $Id: ftp.cc,v 1.132 1997/07/15 05:34:09 wessels Exp $
+ * $Id: ftp.cc,v 1.133 1997/07/16 22:57:02 wessels Exp $
*
* DEBUG: section 9 File Transfer Protocol (FTP)
* AUTHOR: Harvest Derived
safe_free(ftpState->ctrl.last_message);
safe_free(ftpState->title_url);
safe_free(ftpState->filepath);
+ if (ftpState->data.fd > -1)
+ comm_close(ftpState->data.fd);
cbdataFree(ftpState);
}
{
FtpStateData *ftpState = data;
StoreEntry *entry = ftpState->entry;
- assert(cbdataValid(ftpState));
debug(9, 4) ("ftpTimeout: FD %d: '%s'\n", fd, entry->url);
storeAbort(entry, ERR_READ_TIMEOUT, NULL, 0);
- if (ftpState->data.fd >= 0)
+ if (ftpState->data.fd >= 0) {
comm_close(ftpState->data.fd);
+ ftpState->data.fd = -1;
+ }
comm_close(ftpState->ctrl.fd);
}
{
FtpStateData *ftpState = data;
debug(9, 1) ("ftpAbort: %s\n", ftpState->entry->url);
- if (ftpState->data.fd >= 0)
+ if (ftpState->data.fd >= 0) {
comm_close(ftpState->data.fd);
+ ftpState->data.fd = -1;
+ }
comm_close(ftpState->ctrl.fd);
}