Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Apr : tidFTP : connection closed gracefully prevents my app from closing...help
| Subject: | tidFTP : connection closed gracefully prevents my app from closing...help |
| Posted by: | "dave" (richoce..@hotmail.com) |
| Date: | Thu, 24 Apr 2008 12:06:20 |
i have an app that checks on form close if the ftp is connected. if it is it
calls disconnect and then exits when the ftp is disconnected.(see code
below). This works fine as long as the app has not been sitting idle for
awhile. If you leave the app running for a while after connecting, i assume
that the server is time-ing out or something. But the following code:
if MessageDlg('Disconnect and close?', mtConfirmation, [mbYes, mbCancel], 0)
= mrYes then begin
IdFTP1.Disconnect();
Action := caFree;
while IdFTP1.Connected do begin
Action := caNone;
end;
end;
gives me the error message(?)
Connection closed gracefully.
and my app does not close.
if i hit the cancel button on my dialog, then the app exits fine.
what am i doing wrong here?
Any help would be greatly appreciated.
Delphi 7 pro, Indy 10.2.3
Thanks,
Dave