Patch to reconnect when ftp server hangs up on you
Status: Beta
Brought to you by:
mali
This patch allows the reconnect to be useful. The code
was reconnecting, but then was expecting a response
from the ftp server immediately instead of resending
the command that failed.
diff -ruN lufs2.orig/filesystems/ftpfs/ftplib.cpp
lufs2/filesystems/ftpfs/ftplib.cpp
--- lufs2.orig/filesystems/ftpfs/ftplib.cpp Sat Mar 8
15:45:29 2003
+++ lufs2/filesystems/ftpfs/ftplib.cpp Thu Apr 17
10:44:10 2003
@@ -254,6 +254,9 @@
if((!reconnect) || ((res = connect()) < 0)){
WARN("could not reconnect!");
return res;
+ }else{
+ WARN("We reconnected. Retrying.");
+ return -EAGAIN;
}
}