There is an easier way to reproduce the problem :
lftp ftps://user:[EMAIL PROTECTED]/

mkdir empty_dir
du empty_dir

if it works, just repeat du empty_dir
It does not work in ssl (tested with proftpd-1.2.10).

A quick work around is to add a 1/10s pause in case of ssl connect error
(patch attached). But it's obviously not the best solution. For 1 thing,
I don't think this ssl connect error is normal, it must be the
consequence of a deeper problem. And for another, if you test this on a
remote ftp site which completely blocks icmp instead of a local ftp
server, lftp won't detect the ssl connection error, you'll never get
your pause, and you'll just get stuck forever.

Anyway it's still better than nothing, and maybe it will halp someone to
find the real cause of this problem...


--- lftp-3.0.13-orig/src/buffer_ssl.cc  2004-01-16 13:27:32.000000000 +0100
+++ lftp-3.0.13-new/src/buffer_ssl.cc   2005-01-09 03:51:40.000000000 +0100
@@ -21,6 +21,7 @@
 #include <config.h>
 #include "buffer_ssl.h"
 #include "xmalloc.h"
+#include <unistd.h>
 
 #ifdef USE_SSL
 # include <openssl/err.h>
@@ -62,6 +63,7 @@
         else // error
         {
            SetError(lftp_ssl_strerror("SSL connect"),IsFatal(res));
+           usleep(100000);
            return MOVED;
         }
       }

Reply via email to