zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject zookeeper git commit: ZOOKEEPER-2737: close netty connection when exceptions occur during w…
Date Mon, 27 Mar 2017 17:31:48 GMT
Repository: zookeeper
Updated Branches:
  refs/heads/branch-3.5 cc2ea4926 -> 5c356f5a4


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

…rite 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 <hanm@apache.org>

Reviewers: Brian Nixon <nixon@fb.com>, Abraham Fine <afine@apache.org>, Rakesh
Radhakrishnan <rakeshr@apache.org>, Patrick Hunt <phunt@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 <hanm@apache.org>
Authored: Mon Mar 27 10:31:44 2017 -0700
Committer: Michael Han <hanm@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();
             }
         }
 


Mime
View raw message