You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by ha...@apache.org on 2017/03/27 17:31:48 UTC

zookeeper git commit: ZOOKEEPER-2737: close netty connection when exceptions occur during w…

Repository: zookeeper
Updated Branches:
  refs/heads/branch-3.5 cc2ea4926 -> 5c356f5a4


ZOOKEEPER-2737: close netty connection when exceptions occur during w\u2026

\u2026rite to channel to prevent resource leak.

I am OK to add some contrived test case to test this but I'd like to do that later if needed, so this fix can get in upcoming releases..

Author: Michael Han <ha...@apache.org>

Reviewers: Brian Nixon <ni...@fb.com>, Abraham Fine <af...@apache.org>, Rakesh Radhakrishnan <ra...@apache.org>, Patrick Hunt <ph...@apache.org>

Closes #207 from hanm/ZOOKEEPER-2737


Project: http://git-wip-us.apache.org/repos/asf/zookeeper/repo
Commit: http://git-wip-us.apache.org/repos/asf/zookeeper/commit/5c356f5a
Tree: http://git-wip-us.apache.org/repos/asf/zookeeper/tree/5c356f5a
Diff: http://git-wip-us.apache.org/repos/asf/zookeeper/diff/5c356f5a

Branch: refs/heads/branch-3.5
Commit: 5c356f5a47402c000b5e206a536273afc75de883
Parents: cc2ea49
Author: Michael Han <ha...@apache.org>
Authored: Mon Mar 27 10:31:44 2017 -0700
Committer: Michael Han <ha...@apache.org>
Committed: Mon Mar 27 10:31:44 2017 -0700

----------------------------------------------------------------------
 .../main/org/apache/zookeeper/server/NettyServerCnxnFactory.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zookeeper/blob/5c356f5a/src/java/main/org/apache/zookeeper/server/NettyServerCnxnFactory.java
----------------------------------------------------------------------
diff --git a/src/java/main/org/apache/zookeeper/server/NettyServerCnxnFactory.java b/src/java/main/org/apache/zookeeper/server/NettyServerCnxnFactory.java
index 25b682b..a024689 100644
--- a/src/java/main/org/apache/zookeeper/server/NettyServerCnxnFactory.java
+++ b/src/java/main/org/apache/zookeeper/server/NettyServerCnxnFactory.java
@@ -144,8 +144,8 @@ public class NettyServerCnxnFactory extends ServerCnxnFactory {
             if (cnxn != null) {
                 if (LOG.isDebugEnabled()) {
                     LOG.debug("Closing " + cnxn);
-                    cnxn.close();
                 }
+                cnxn.close();
             }
         }