If the node potentially was created by the server, but then client returned an error (e.g. ErrConnectionClose because of networking glitch), the node remains bound to the restored session and prevents acquisition of newer locks, since according to zk recipes for locks, there is a watch created on that node within the following lock, which dead locks further lock acquisition.
Coverage increased (+0.9%) to 80.482% when pulling 64ed7173b5ed647f9b7fe7c7adf518a67178f89c on ishveda:clean-obsolete-nodes into 2cc03de413da42869e2db7ce7965d3e978d917eb on samuel:master.
If the node potentially was created by the server, but then client returned an error (e.g. ErrConnectionClose because of networking glitch), the node remains bound to the restored session and prevents acquisition of newer locks, since according to zk recipes for locks, there is a watch created on that node within the following lock, which dead locks further lock acquisition.
it fixes https://github.com/samuel/go-zookeeper/issues/229