zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From timothyjward <...@git.apache.org>
Subject [GitHub] zookeeper pull request #529: [ZOOKEEPER-2368] Send a watch event is when a c...
Date Mon, 18 Jun 2018 14:07:09 GMT
Github user timothyjward commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/529#discussion_r196090467
  
    --- 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 --
    
    Good catch - in the previous version of this patch the terminal event re-used the disconnected
state for closing (hence removing the if check. Now that we have a Closed event the Disconnected
event should still be sent if the client is connected at the time of the close.


---

Mime
View raw message