If the server is working couple of minutes or hours client freeze every X seconds
posted 3 years ago
As the title says it all.
But I'll explain even further.
Even if i dont send messages to server and the server is working after couple of minutes or hours.. the client starts to freeze every X seconds...
And i mean that on the first couple minutes it works clean without freezes and after that the client freeze.
I dont know why.
I dont find the code compilable. Can you please post a compilable code?
Secondly, You are creating Resources like BufferedReader, Sockets, PrintWriter but not closing it. This will lead to these resources lying around open for more longer time than required. Also see if you can profile the application using some profiling tools to identify if Garbage Collection is kicking in with long pauses which is leading to the freeze.