On Sat, Aug 23, 2008 at 01:36:16PM +0400, Alexander V. Lukyanov wrote:
> On Fri, Aug 22, 2008 at 10:24:44PM +0100, [EMAIL PROTECTED] wrote:
> > Im having problems mirroring a directory accross servers. it ends
> > up getting stuck on
> > 'filename' at 0 (0%) [Waiting for transfer to complete]
> >
> > even though the file has transfered between the two ( CRC ok ) and
> > the server has  acknowledged this:
> > <--- 226 Transfer finished successfully. Data connection closed.
>
> Most probably the second server has not acknowledged transfer completion.
> The fix could be to set a timeout when the first server sends the 
> acknowledgement.

Please try this patch.

--
   Alexander.
Index: FileCopyFtp.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/FileCopyFtp.cc,v
retrieving revision 1.25
diff -u -p -r1.25 FileCopyFtp.cc
--- FileCopyFtp.cc      23 Apr 2007 07:11:41 -0000      1.25
+++ FileCopyFtp.cc      23 Aug 2008 10:06:27 -0000
@@ -187,9 +187,11 @@ int FileCopyFtp::Do()
       RateReset();
    }
 
-   // check for timeout when target is done, and source is stale
+   // check for timeout when one session is done, and the other is stuck
    if(dst_res==FA::OK && src_res==FA::IN_PROGRESS)
       ftp_src->CopyCheckTimeout(ftp_dst);
+   if(src_res==FA::OK && dst_res==FA::IN_PROGRESS)
+      ftp_dst->CopyCheckTimeout(ftp_src);
 
    off_t add=ftp_dst->GetPos()-put->GetRealPos();
    if(add>0)

Reply via email to