ZooKeeper Session Expiration Guide
When ZooKeeper detects that a client’s session has expired, it notifies the client and then removes the client’s session from its internal session manager. At this point, ZooKeeper will delete all temporary nodes and watchers associated with the client, and will no longer accept any requests from that client. The client will receive a notification of session expiration and can choose to reconnect to the ZooKeeper server to obtain a new session. After a ZooKeeper session has expired, the client must reconnect to the ZooKeeper server and re-establish all temporary nodes and watchers.