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
602 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
TheLeader earned 500 total points
ID: 9808236
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

710 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