Got it. Thanks for the explanation. It seems the ZOO_ASSOCIATING_STATE is never passed to a watcher callback as the state argument, so I probably don't need to care about it.
Thanks, Ying-Yi Liang On 6/25/10 11:25 AM, "Patrick Hunt" <ph...@apache.org> wrote: > > On 06/24/2010 08:32 PM, Ying-Yi Liang wrote: >> I noticed there are a few inconsistence of session state values >> between the C client and the Java client. I tried to search for an >> explanation of the ZOO_ASSOCIATING_STATE (=2) declared in >> src/c/include/zookeeper.h in the source comments and on the web, but >> didnĀ¹t have luck. Can anyone please explain what this state means? Is >> this state ever returned by the server? >> > > The session is "associating" after a TCP connection has been made but > before the session is actually established. See prime_connection of > zookeeper.c. > > Patrick