Board index » delphi » TCPServer using 100% CPU time
Marcelo Rodrigues
![]() Delphi Developer |
TCPServer using 100% CPU time2004-05-03 10:10:09 PM delphi110 Hi, I have a TCP Server application built using TidTCPServer. This application handles clients connections and those clients weren't made using Indy. The Server must keep clients connections to be able to send messages back to then, not only as responses to clients answers. Everything is going fine. There is only one problem: The clients doesn't always disconnect gracefully. So I tried to put a Timer that checks if the clients last message is greater then 60 seconds. If so the server disconnects the client. Most of the time it works fine. But sometimes, something gets wrong and the Server start to use nearly 100% of CPU time. The server doesn't stop it can continue to talk with the remaining clients. But the machine speed get very slow. Does anyone knows how can I solve this? Thanks Marcelo Rodrigues |