Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
3.2.1
-
None
-
None
Description
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.