Archived

This forum has been archived. Please start a new discussion on GitHub.

Ice timeouts, callbacks, and shutdown.

I have a scenario where a servant is attempting to use a callback and due to a network disruption/disconnect the callback operation is stuck since the timeout value is set to a long time. Fortunatley, there is another thread that tests the callback proxy using ice_ping so I know when the connection has gone down.

My plan is to use a very small timeout value on the ice_ping such that it returns immediately. When the ice_ping results in a connection closed exception, or similiar, the thread attempts to shutdown/cleanup the servant by doing a remove operation in the object adapter. However, the servant may be in the process of using the proxy which if the timeout value is set to a long time, may take a while to return.

I guess I'm wondering how to gracefully shutdown a proxy that may still be in use.

Regards --Roland

Comments

  • You cannot gracefully shut down a connection that is still in use for a method call. We might add a method that allows you to close a connection that is used by a certain proxy forcefully (not gracefully) in the next version of Ice. "Forcefully" means that the connection will be simply closed, meaning that method calls on proxies using this connection will see an exception, and the server will also see an exception, which is logged if connection warnings are enabled, or ignored otherwise.