Re: Connected dosn't correct when server kick me

Giganews Newsgroups
Subject: Re: Connected dosn't correct when server kick me
Posted by:  Remy Lebeau \(Indy Team\) (no.spam@no.spam.com)
Date: Tue, 26 May 2009

"explorer" <explorer.…@Gmail.com> wrote in message
news:90EF3E7FB082E340explorer.…@Gmail.com...

> But Next time when the thread resume, it will call "If Not
> Idftp.Connected then IdFTP.Connted; ...", Idftp.Connected
> always return ture, then I will got a lot of exceptions.

Sounds like you left unread data in the InputBuffer when you disconnected.
When the InputBuffer is not empty, Connected() will return true. This is by
design.  Try clearing the InputBuffer when you disconnct.

> Indy10.0.52

That is a VERY old version of Indy 10.  You should consider upgrading.  The
current version is 10.5.5.

--
Remy Lebeau (Indy Team)

Replies

In response to

Connected dosn't correct when server kick me posted by explorer on Mon, 25 May 2009