You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2019/06/28 23:04:20 UTC

[GitHub] [zookeeper] enixon commented on a change in pull request #996: ZOOKEEPER-3240: Close socket on Learner shutdown to avoid dangling so…

enixon commented on a change in pull request #996: ZOOKEEPER-3240: Close socket on Learner shutdown to avoid dangling so…
URL: https://github.com/apache/zookeeper/pull/996#discussion_r298771189
 
 

 ##########
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Learner.java
 ##########
 @@ -682,4 +683,14 @@ public void shutdown() {
     boolean isRunning() {
         return self.isRunning() && zk.isRunning();
     }
+
+    void closeSocket() {
+        try {
+            if (sock != null && !sock.isClosed()) {
 
 Review comment:
   You're completely right, this check doesn't actually contribute anything - I'll remove it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services