You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by enixon <gi...@git.apache.org> on 2018/06/18 01:23:32 UTC

[GitHub] zookeeper pull request #529: [ZOOKEEPER-2368] Send a watch event is when a c...

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. 


---