|Subject:||Re: FTP Hanging|
|Posted by:||Remy Lebeau (TeamB) (firstname.lastname@example.org)|
|Date:||Thu, 13 Jul 2006|
"Pierre Roux" <pier…@openwater.co.za> wrote in message
> The while loop never exits.
TIdFTP creates TIdSimpleServer instances on a per-transfer basis, and frees
it at the end of each transfer. So you can't be getting an hangup between
transfers trying to reuse a socket. What the loop is doing is waiting for
the FTP Server to connect to the TIdSimpleServer's listening socket until
either the listen is aborted or a connection is available to be accepted.
So the only way that code could be looping forever is if the FTP Server is
not able to reach your client, such as by a firewall/router blocking the
connection. In which case the server should be sending back an error
message that causes TIdFTP to abort the listening.
With that said, though, you are using an older version of Indy 10 anyway.
The code snippet you showed no longer exists. It was removed 4 months ago
when Listen() was re-written to accept a timeout parameter from TIdFTP,
which in turn got a new ListenTimeout property added to it. So make sure
you are using the absolute latest 10.1.5 snapshot from Indy's website.
FTP Hanging posted by Pierre Roux on Thu, 13 Jul 2006