On Mon, Nov 5, 2012 at 2:16 PM, Yunong Xiao <yjx...@gmail.com> wrote:
> What happens if the server is offline? In the scenario you described, select()
> will never succeed, and zookeeper_interest() will never inform the upstream
> consumer that the server is down. That's the crux of the problem here, when 
> the
> server is unavailable, the client needs to know after some amount of time that
> the connection has failed. Otherwise the upstream consumer has no idea the
> connection to zookeeper has been severed and will hang indefinitely.

If the server is offline, zookeeper client keeps trying to connect to
the server indefinitely. It's up to the caller to decide when to give
up. One possibility is to poll the connection state using zoo_state()
and give up on the handle if it doesn't become connected after certain
time.

--Michi

--Michi

Reply via email to