Reset server on Ice::ConnectionLostException
I'm trialling the use of Ice 3.7 C++ in a server which manages a hardware resource, and running into some confusing behaviour. I'm using two-way connections, and if the client terminates unexpectedly, the server exits with this message:
terminate called after throwing an instance of 'Ice::ConnectionLostException' what(): src/Ice/StreamSocket.cpp:249: ::Ice::ConnectionLostException: connection lost: recv() returned zero Aborted
The server is using Ice::Service, and I'm not changing any properties from their defaults. Now the docs say that a ConnectionLostException will be logged, but never mention that it will result in program abort.
So my first problem is I need to preventing ConnectionLostException resulting in abort. Secondly, if I could gracefully handle ConnectionLostException and prepare the server for the next connection that'd be helpful. I understand that one can't depend on always receiving that exception as a means of reset, but since I'm managing a hardware resource that takes time and energy to stop and start, it'd be nice to have it ready sooner, on a kind of best-effort basis.