have written a minimal server program using the cc++/thread.h and cc++/socket.h.
I runs flawlessly when I connect with clients on the same machine.
When I connect with a client from another machine (another machine on lan) things work fine until the client disconnects. Then my server craps out with "Aborted" message.
I have tried catch(...) everywhere, but can't seem to catch the error.
Has anyone had similar problems, and how did you solve them?
If someone thinks they have an answer, I will be more than happy to send the code (it is very small).
Thanks.
CommonC++ 1.9.6, on Linux 2.4.18.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Have you set Socket::setError(true)? If you did, make sure to catch those errors!
hmmm... I've no idea what would happen if you tried to do it, but maybe the 'abort' comes from a throw inside a signal-handler?
Set the termination/unexpected (set_terminate(), set_unexpected) handler and use RTTI and backtrace() from glibc to get more information..
make sure your function feature a throw-signature and set a meaningful unexpected-handler! (I'd love to see CommonC++ using throw-signatures :-) )
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
have written a minimal server program using the cc++/thread.h and cc++/socket.h.
I runs flawlessly when I connect with clients on the same machine.
When I connect with a client from another machine (another machine on lan) things work fine until the client disconnects. Then my server craps out with "Aborted" message.
I have tried catch(...) everywhere, but can't seem to catch the error.
Has anyone had similar problems, and how did you solve them?
If someone thinks they have an answer, I will be more than happy to send the code (it is very small).
Thanks.
CommonC++ 1.9.6, on Linux 2.4.18.
How about posting a little backtrace?
Have you set Socket::setError(true)? If you did, make sure to catch those errors!
hmmm... I've no idea what would happen if you tried to do it, but maybe the 'abort' comes from a throw inside a signal-handler?
Set the termination/unexpected (set_terminate(), set_unexpected) handler and use RTTI and backtrace() from glibc to get more information..
make sure your function feature a throw-signature and set a meaningful unexpected-handler! (I'd love to see CommonC++ using throw-signatures :-) )