I've made an applicaction using your Thread and TCP stream and socket classes. All seemed to works fine, but one made the put on production, the program deads after 2 hours. An exception is catched, but no one line of this code can produce any exception (refering to CommonC++'s API reference), what could be going on?
The application tries to be ( :( ), a multithreading server. This server acts in the following manner:
a) Create server sockets
b) Become waiting for new incoming connections.
c) Creates a new thread to serve de request
d) Starts the thred.
try {
while (serverSocket->isPendingConnection()) {
service = new ServiceThread (serverSocket);
service -> detach();
}
}
catch (...) {
logger->registraFallo("Unexpeted exception produced!!!");
}
}
As I told you, the unexpected exception is produced every two hours, and I don't have any idea of why (it's strange because I've implemented a watchdog using netcat and the cron, which request an ARE_YOU_ALIVE frame every two minutes, and these are always the ones which hang-off the server...)