]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Comment on FTP recovery from data.fd loss
authorAmos Jeffries <squid3@treenet.co.nz>
Wed, 24 Sep 2008 11:57:15 +0000 (23:57 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 24 Sep 2008 11:57:15 +0000 (23:57 +1200)
src/ftp.cc

index f23ff0790048259634a111f88f6a5901a044c5c0..05271a843f942a1eac78d287dce6e8655ad38b32 100644 (file)
@@ -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");
 }