Menu

#9 Patch to reconnect when ftp server hangs up on you

open
nobody
None
5
2003-04-17
2003-04-17
No

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;
}
}

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.