python-zk / kazoo

Kazoo is a high-level Python library that makes it easier to use Apache Zookeeper.
https://kazoo.readthedocs.io
Apache License 2.0
1.3k stars 387 forks source link

Manage session expirations with connection timeout #407

Closed ralt closed 8 years ago

ralt commented 8 years ago

Before this change, kazoo is getting a TimeoutError (transformed into a ConnectionDropped error by the _socket_error_handling manager), which doesn't let the zk loop know that it should stop connecting, even long after the session has expired. It means that kazoo was forever looping, trying to get a new connection.

ralt commented 8 years ago

Sorry, this is against the ZK protocol as defined here: https://zookeeper.apache.org/doc/trunk/zookeeperProgrammers.html#ch_zkSessions

Closing.