Invalidate watches when a connection fails to be re-established 🔓
Invalidate watches when a connection fails to be re-established 🔓

When the session timeout expires, watches (and any other ephemeral resources created in that session) are invalid. This causes particular issues with our lock implementation, where clients believe they are still in possession of a lock until they reconnect to ZK.

This is very bad: in a split-brain scenario (where certain nodes can connect and others can't), two nodes could believe they hold the same lock.

hailocab/go-zookeeper,mondough/go-zookeeper