You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by ra...@apache.org on 2014/06/18 01:03:14 UTC
[10/18] git commit: CURATOR-110 - Fixed up the connection
notifications so that they will only notify blocked clients when a connected
state is reached, rather than any state.
CURATOR-110 - Fixed up the connection notifications so that they will
only notify blocked clients when a connected state is reached, rather
than any state.
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/59bab738
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/59bab738
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/59bab738
Branch: refs/heads/master
Commit: 59bab738f56e3e5017bcba8984c1d8ca24e1e71a
Parents: e8138ed
Author: Cameron McKenzie <mc...@gmail.com>
Authored: Mon Jun 16 16:45:17 2014 +1000
Committer: Cameron McKenzie <mc...@gmail.com>
Committed: Mon Jun 16 16:45:17 2014 +1000
----------------------------------------------------------------------
.../apache/curator/framework/imps/CuratorFrameworkImpl.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/59bab738/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java b/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java
index d1de29f..14473d8 100644
--- a/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java
+++ b/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java
@@ -173,9 +173,12 @@ public class CuratorFrameworkImpl implements CuratorFramework
@Override
public void stateChanged(CuratorFramework client, ConnectionState newState)
{
- synchronized(connectionLock)
+ if(newState.isConnected())
{
- connectionLock.notifyAll();
+ synchronized(connectionLock)
+ {
+ connectionLock.notifyAll();
+ }
}
}
});