I have a client-server application with a java server. It works pretty much perfect, except that after an extended period of time, all of a sudden, a socket keeps hanging. This socket is but one of many, the rest seem to do fine still, but once it gets to the socket, the server simply does not go past the sending line. These are the relevant pieces of the code:
Socket socket; // A normal socket
out = new PrintWriter(socket.getOutputStream(), true); // The outstream
out.println(msg + "\0"); // This command is used to send stuff, msg is a String
No exceptions are thrown, the line application simply does not seem to get past the line:
out.println(msg + "\0");
I do know that the String is a good one, cause 4 or 5 other sockets before this one could send it just fine. Also note that, as far as I know, this socket could send hundreds of messages just fine before it suddenly hangs. Does anyone have a clue what kind of error I should be looking for?