> For some reason the FTP server I'm connecting to seems to close the 
> session for no specific reason - here shown with a 426 error, that 
> currently my code is ignoring and hence I then get a later problem 
> 530.
> 
>  From my FTPClient logs
> 
> 15:36:17:405 local - C:\ProgramData\Navigator Systems\NX SQL 
> Server\Downloaded Updates\HireTrack NX\3.0.1.169\HireTrack NX.inf
> 15:36:17:405 host  - /pub/HireTRACK NX/autoupdates/HireTrack 
> NX/3.0.1.169/HireTrack NX.inf
> 15:36:17:405 changing to binary mode
> 15:36:17:405 Request MlsdAsync Done.
> 15:36:17:405 StatusCode = 0
> 15:36:17:405 LastResponse was : ''
> 15:36:17:405 Error = 426 ()
> 15:36:17:701 Session Connected, error = 0
> 15:36:17:701 Request MlsdAsync Done.
> 15:36:17:701 StatusCode = 220
> 15:36:17:701 LastResponse was : '220 ProFTPD 1.3.3a Server (My FTP 
> server) [::ffff:205.196.214.163]'
> 15:36:17:701 No error
> 15:36:17:701 C:\ProgramData\Navigator Systems\NX SQL 
> Server\Downloaded Updates\HireTrack NX\3.0.1.169\HireTrack NX.inf
> 15:36:17:701 starting download
> 15:36:17:859 Request GetAsync Done.
> 15:36:17:859 StatusCode = 530
> 15:36:17:859 LastResponse was : '530 Please login with USER and 
> PASS'

You are sending commands out of sequence, the session connected event appears
after you've already sent two commands, you then start to download before
you've even logged into the server.  You also ignore the 426 error and the
other out of sequence responses. 

Looks like you are using async methods and not waiting for them to complete
before sending more commands. 

> My question is whether FTPClient component has this reconnection 
> and retry option already built in (and I just need to activate it 
> by setting a property) or whether I need to code it up myself ?

Retrying won't help if you are not waiting for command to complete.  
The basic FTP component does not automate anything except the login sequence,
and does not handle any errors with retries.  

Instead you should use TMagFtp from: 

http://www.magsys.co.uk/delphi/magxfer.asp

which automates everything and does file and session retries, if requested.

Angus
 


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to