Home Help Center

ConnectionLost notification issue

dorianleedorianlee Member dorian leeOrganization: pkeProject: passenger information display system
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.


  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff

    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.

Sign In or Register to comment.