Solved

Error working with delphi 7 and indy. I'm using TCPServer and TCPClient and I get the error when I try to change TCPServer ACTIVE property to false in order to close the form next.

Posted on 2003-11-23
1
601 Views
Last Modified: 2007-12-19
When I change ACTIVE property from TCPServer in indy I get the next error: Terminate Thread Timeout.
When I close the form it also appears the same error.
The error doesn't appear if no clients have connected during the time server has been connected. Then server closes well.
I have tried to connect only one client and close the thread manually. I have done this:

1. when client connects

procedure TfServ.TCPServidorConnect(AThread: TIdPeerThread);
var ID: Integer;
begin
ID:= plFils.Add(AThread);
end;

Now I have a pointer of the TIdPeerThread in a pointer list. It's the first client it has connected so the index is 0. Then i try to terminate the thread:

procedure TfServ.bDesconnectarClick(Sender: TObject);
var Client: TIdPeerThread;
begin
Client:= plFils[0];
Client.Terminate;

end;

This is simple and has worked but when i change ACTIVE property to false or I close the form i have the same error, Terminate Thread Timeout, again. Do these things have any relation?

Does anybody know which is the problem? Why am I not able to close the program?

Thanks.
0
Comment
Question by:elhbow86
1 Comment
 
LVL 2

Accepted Solution

by:
TheLeader earned 500 total points
ID: 9808236
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question