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

ConnectionLost notification issue

I make a call from client to server using the proxy I keeped after my first successfully resolved,like this

Ice::ObjectPrx svcBase = m_commPtr->stringToProxy(objectName);
m_proxy = ObjectPrx::checkedCast(svcBase) ;


everything goes well,But after I unplug the cable of client and make a call from client to server, it will take about 20s to detect the connection lost and call failure then throw a exception, during this time, it just blocked the thread. I want to know is there any way to fast detect the connection lost or call failure?

thanks a lot.


  • benoit
    benoit Rennes, France

    Ice relies on the operating system to detect the connection loss.

    If you want the request to fail sooner you will need to set a timeout to an appropriate value. If the call doesn't return within this timeout period it will throw a timeout exception. See Connection Timeouts in the Ice manual for more information.