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;
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;
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?