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
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
600 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

790 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