From: Amos Jeffries Date: Wed, 24 Sep 2008 11:57:15 +0000 (+1200) Subject: Comment on FTP recovery from data.fd loss X-Git-Tag: SQUID_3_1_0_1~49^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a5b4ce11c08d096dc951f052275147f36b14fed;p=thirdparty%2Fsquid.git Comment on FTP recovery from data.fd loss --- diff --git a/src/ftp.cc b/src/ftp.cc index f23ff07900..05271a843f 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -428,8 +428,13 @@ void FtpStateData::dataClosed(const CommCloseCbParams &io) { data.clear(); - failed(ERR_FTP_FAILURE, 0); // or is it better to call abortTransaction()? + failed(ERR_FTP_FAILURE, 0); /* failed closes ctrl.fd and frees ftpState */ + + /* NP: failure recovery may be possible when its only a data.fd failure. + * is the ctrl.fd is still fine, we can send ABOR down it and retry. + * Just need to watch out for wider Squid states like shutting down or reconfigure. + */ } FtpStateData::FtpStateData(FwdState *theFwdState) : AsyncJob("FtpStateData"), ServerStateData(theFwdState) @@ -3888,7 +3893,7 @@ FtpStateData::abortTransaction(const char *reason) comm_close(ctrl.fd); return; } - + fwd->handleUnregisteredServerEnd(); deleteThis("FtpStateData::abortTransaction"); }