Re: infinite loop in function TIdSimpleServer.Listen

Giganews Newsgroups
Subject: Re: infinite loop in function TIdSimpleServer.Listen
Posted by:  Remy Lebeau (Indy Team) (no.spam@no.spam.com)
Date: Thu, 24 Aug 2006

"rodolfor" <rodolf…@euristica.com> wrote in message
news:AFC1FC522F05E340rodolf…@euristica.com...

> If I have a lot of file, sometimes the ftp component freeze.
> In particular I have noted thant the software is blocked in
> the function TIdListenServer.Listen where it cycle infinitely
> this loop:
<snip>
> because result is always false and FAbortedRequested is
> always false.

The only way Select() can keep returning False is if no connection is ever
being established.  That suggests that one of the connections is likely
being blocked, such as by a firewall or router.

>        while (FAbortedRequested = False) and (Result = False) do begin
>          Result := Select(AcceptWait);

You are using an older snapshot.  That codes does not exist anymore in the
current snapshot.  An ATimeout parameter has already been added to Listen(),
and a new ListenTimeout property has been added to TIdFTP as well.

> Do you have sone workaround ?

Upgrade to a newer snapshot.

Gambit

Replies

None

In response to

infinite loop in function TIdSimpleServer.Listen posted by rodolfor on Thu, 24 Aug 2006