Github user enixon commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/529#discussion_r195949390
  
    --- Diff: src/java/main/org/apache/zookeeper/ClientCnxn.java ---
    @@ -1260,10 +1260,8 @@ public void run() {
                     cleanup();
                 }
                 clientCnxnSocket.close();
    -            if (state.isAlive()) {
    -                eventThread.queueEvent(new 
WatchedEvent(Event.EventType.None,
    -                        Event.KeeperState.Disconnected, null));
    -            }
    +            eventThread.queueEvent(new WatchedEvent(Event.EventType.None,
    +                        Event.KeeperState.Closed, null));
    --- End diff --
    
    I'd expect the client to always receive a Disconnected state before 
receiving a Closed state and it looks like that constraint is not enforced. 


---

Reply via email to