Re: Ftp connection freezes

Giganews Newsgroups
Subject: Re: Ftp connection freezes
Posted by:  Remy Lebeau (TeamB) (no.spam@no.spam.com)
Date: Mon, 19 Sep 2005

"Gustavo Ricardi" <gricar…@cybelesoft.com> wrote in message
news:4D9DBD77CCDAE240gricar…@cybelesoft.com...

> 1) If I check the Connected property from my main thread
> during a ftp processing, the ftp hangs.

If the TIdFTP instance belongs to a worker thread, then the main thread
should not be accessing the Connected property directly.  You are likely
getting into a situation where two threads are trying to read from the
socket at the same time, thus messing each other up.  You will have to
provide your own synchronized access to the TIdFTP, such as by using a mutex
or critical section.

Gambit

Replies

In response to

Ftp connection freezes posted by Gustavo Ricardi on Mon, 19 Sep 2005