Re: forcefully close connection + indy10

Giganews Newsgroups
Subject: Re: forcefully close connection + indy10
Posted by:  Pierre Axelsson (
Date: Mon, 19 Sep 2005

Upgraded to 10.0.76 with no change. I still can't close a connection by

[11:53:26.807|INFO-FOR-DEBUG]: Will Abort. Connected? True
[11:53:26.822|INFO-FOR-DEBUG]: Done Abort. Connected? True
[11:53:26.822|INFO-FOR-DEBUG]: Will Quit. Connected? True
[11:53:26.822|INFO-FOR-DEBUG]: Done Quit. Connected? True
[11:53:26.822|INFO-FOR-DEBUG]: Will Disconnect-no-notify. Connected? True
[11:53:26.822|INFO-FOR-DEBUG]: done Disconnect-no-notify. Connected? True

This is from a log file of mine, where I execute a number of steps (each in
its own try...except clause) and I also check the value of the 'Connected'
property before and after each step. As you can see it remains connected.


"Pierre Axelsson" <> skrev i meddelandet
>I have a thread that reuses a TIdFTP object through multiple FTP sessions.
>At the end of a sessions it should close the connection and by force if
>necessary. It's the "by force" stuff I can't get to work in Indy10.
> Under Indy9 this worked wonderfully using:
> if AFtpClient.Connected then AFtpClient.DisconnectSocket;
> According to the docs the equivalent way in indy10 is to do:
> if AFtpClient.Connected then AFtpClient.Disconnect(false);
> (I've also tried AFtpClient.IOHandler.Close with no success.)
> ...but it doesn't work. Next time around when I try to connect I get an
> exception saying "already connected".
> Ideas?
> Thanks.
> /Pierre


In response to

forcefully close connection + indy10 posted by Pierre Axelsson on Thu, 15 Sep 2005