Code review comment for lp:~niemeyer/gozk/watches-die-on-reconnection

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

*** Submitted:

Any session event on a watcher now fires and closes the watch.

Also test that closing the connection closes the watch.

R=dfc
CC=
https://codereview.appspot.com/6292044

https://codereview.appspot.com/6292044/diff/1/zk.go
File zk.go (right):

https://codereview.appspot.com/6292044/diff/1/zk.go#newcode1049
zk.go:1049: // non-session watches as fatal.
On 2012/06/04 22:58:59, dfc wrote:
> this comment is a little confusing; does it mean

> // .. but we take all session events that occur before a session is
established
> as errors.

Improved comment. Thanks for the poke.

https://codereview.appspot.com/6292044/diff/1/zk_test.go
File zk_test.go (right):

https://codereview.appspot.com/6292044/diff/1/zk_test.go#newcode340
zk_test.go:340: case <-time.After(3e9):
On 2012/06/04 22:58:59, dfc wrote:
> nit: 3 * time.Second

> you've imported time, so you might as well make use of the constant.

I've copy & pasted that. There are tons of uses here, historical. I
woudln't like to change that right now if that's ok.

https://codereview.appspot.com/6292044/

« Back to merge proposal