Description
As seen in CURATOR-525, there is a lot of tech debt and, frankly, incomprehensible code in parts of Curator's connection handling. CURATOR-525 had to add an ugly hack due to races between ZooKeeper's watcher thread and Curator's connection state setting thread.
Consider, reworking or rewriting the connection handling in Curator.