Why does Indy 10's echo server have high CPU usage when the client disconnects?
Posted
by
Virtuo
on Stack Overflow
See other posts from Stack Overflow
or by Virtuo
Published on 2010-12-28T22:25:35Z
Indexed on
2010/12/29
0:53 UTC
Read the original article
Hit count: 202
When I disconnect echo client like :
EchoClient1.Disconnect;
client disconnects fine... but EchoServer does NOT EVEN register client disconnection and it ends up with high process usage !?!?
in every example and every doc it says that calling EchoClient.Disconnect is sufficient !
anyone, any idea ?
(I am working in Win7, cloud that be a problem ?)
Server code :
procedure TForm2.EServerConnect(AContext: TIdContext);
begin
SrvMsg.Lines.Add('ECHO Client connected !');
end;
procedure TForm2.EServerDisconnect(AContext: TIdContext);
begin
SrvMsg.Lines.Add('ECHO Client disconnected !');
end;
problem is "TForm2.EServerDisconnect" never executes !?!?
© Stack Overflow or respective owner