python-zk/kazoo — pull request #174 by nailor (2014-03-04 13:34:08+00:00)
Title: connection: Set closed state when zk_loop stops

Calling client.stop() for a client does not always set the client state
KeeperState.CLOSED. This can lead into a situation that client keeps
raising SessionExpired even if the client is actually stopped. This in
turn makes for example ChildrenWatch unable to stop, halting the
handler's stop call too while joining the threads.