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
591 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now