helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zzh...@apache.org
Subject git commit: fix listener leaking on session expiry
Date Wed, 01 May 2013 21:26:06 GMT
Updated Branches:
  refs/heads/master 0bc258cfe -> d5289aebc


fix listener leaking on session expiry


Project: http://git-wip-us.apache.org/repos/asf/incubator-helix/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-helix/commit/d5289aeb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-helix/tree/d5289aeb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-helix/diff/d5289aeb

Branch: refs/heads/master
Commit: d5289aebc0a386b82b2d23797ce7b47b90e84fdc
Parents: 0bc258c
Author: zzhang <zzhang5@uci.edu>
Authored: Wed May 1 14:26:00 2013 -0700
Committer: zzhang <zzhang5@uci.edu>
Committed: Wed May 1 14:26:00 2013 -0700

----------------------------------------------------------------------
 .../apache/helix/manager/zk/ZKHelixManager.java    |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/d5289aeb/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java b/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java
index a944c35..4095796 100644
--- a/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java
+++ b/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java
@@ -251,8 +251,6 @@ public class ZKHelixManager implements HelixManager
     checkConnected();
 
     PropertyType type = propertyKey.getType();
-    CallbackHandler newHandler =
-        createCallBackHandler(propertyKey, listener, eventType, changeType);
 
     synchronized (this)
     {
@@ -265,7 +263,9 @@ public class ZKHelixManager implements HelixManager
           return;
         }
       }
-
+      
+      CallbackHandler newHandler =
+          createCallBackHandler(propertyKey, listener, eventType, changeType);
       _handlers.add(newHandler);
       logger.info("Add listener: " + listener + " for type: " + type + " to path: " + newHandler.getPath());
     }


Mime
View raw message