> is_unrecoverable() means exactly that: the session is toast. nothing you do > will get it back.
Ok, I was wondering about what exactly was unrecoverable indeed. > zookeeper_init is almost never used with a non-null client_id. the main use > case for it is crash recovery. i've rarely seen it used, but you can start a > session, save off the client_id to disk, create ephemerals etc., then if > your program crashes, you can restart and recover the session and pick back > up where you left off. in this case we don't worry about the session being > closed by the previous instance of the program because it crashed. it's > pretty tricky to use. Understood. I agree this is a pretty unique case, and a very hard one to get right by itself (how to get the app in the proper state to receive watches after the whole application has crashed?). -- Gustavo Niemeyer http://niemeyer.net http://niemeyer.net/blog http://niemeyer.net/twitter