Hi everyone

in the c client api:

Is it normal for zoo_state() to return zero (not one of the valid state
consts) when it is handling socket errors?


In the C Code, handle_error(), which handles socket errors,  sets the
zh->state to zero, 
==================
    if (!is_unrecoverable(zh))  
        zh->state = 0;
==================

If the handle is recoverable, why is the state set to zero, which is not
even a valid state const? 

Here's a use case where the state should be connecting, but instead is
zero:

1) c client connects to a zkserver
2) shutdown zkserver
3) zoo_state() returns zero on a valid zookeeper handle. 


We are using zoo_state() to get the state of the connection, and this is
a surprising returned value from this function.


Thanks,

michael

Reply via email to