- Kamil Dudka brought the patch from the Redhat bug entry

https://bugzilla.redhat.com/show_bug.cgi?id=427966 which was libcurl closing
  a bad file descriptor when closing down the FTP data connection.  Caolan
  McNamara seems to be the original author of it.
This commit is contained in:
Daniel Stenberg 2009-05-19 20:54:31 +00:00
parent e3ead9f585
commit de7a14003c
3 changed files with 12 additions and 5 deletions

View file

@ -3251,9 +3251,10 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
/* Note that we keep "use" set to TRUE since that (next) connection is
still requested to use SSL */
}
sclose(conn->sock[SECONDARYSOCKET]);
conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD;
if(CURL_SOCKET_BAD != conn->sock[SECONDARYSOCKET]) {
sclose(conn->sock[SECONDARYSOCKET]);
conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD;
}
}
if((ftp->transfer == FTPTRANSFER_BODY) && ftpc->ctl_valid &&