C client's zoo_state function returns unknown state 0 -----------------------------------------------------
Key: ZOOKEEPER-553 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-553 Project: Zookeeper Issue Type: Bug Components: c client, contrib-bindings Affects Versions: 3.2.1 Reporter: Steven Wong Using zkpython with ZK 3.2.1 release: import zookeeper as z zh = z.init(...) z.state(zh) # returns 3 == z.CONNECTED_STATE # kill standalone ZK server z.state(zh) # returns 0 == ??? The problem is that 0 is not a state defined by the C client's zookeeper.[ch]. Perhaps 0 should've been defined as something like DISCONNECTED_STATE? (Java's KeeperState.Disconnected is 0, if that matters.) If the fix is to define 0 as a new state, changes will be needed to both the C client and zkpython. Not sure about other bindings. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.