Repository: curator
Updated Branches:
  refs/heads/CURATOR-123 feb13e1c1 -> a86a667bb


Fix that causes CONNECT to be sent when the read/write connection is 
established. It can be argued that CONNECT should never be sent though. 
Discussing...


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

Branch: refs/heads/CURATOR-123
Commit: a86a667bb1213fec26fbdb8354bdc01b9fe70396
Parents: feb13e1
Author: randgalt <[email protected]>
Authored: Tue Jul 22 16:07:13 2014 -0500
Committer: randgalt <[email protected]>
Committed: Tue Jul 22 16:07:13 2014 -0500

----------------------------------------------------------------------
 .../org/apache/curator/framework/state/ConnectionStateManager.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/a86a667b/curator-framework/src/main/java/org/apache/curator/framework/state/ConnectionStateManager.java
----------------------------------------------------------------------
diff --git 
a/curator-framework/src/main/java/org/apache/curator/framework/state/ConnectionStateManager.java
 
b/curator-framework/src/main/java/org/apache/curator/framework/state/ConnectionStateManager.java
index 2a0cdd1..67ff13d 100644
--- 
a/curator-framework/src/main/java/org/apache/curator/framework/state/ConnectionStateManager.java
+++ 
b/curator-framework/src/main/java/org/apache/curator/framework/state/ConnectionStateManager.java
@@ -180,7 +180,7 @@ public class ConnectionStateManager implements Closeable
         currentConnectionState = newConnectionState;
 
         ConnectionState localState = newConnectionState;
-        boolean isNegativeMessage = ((newConnectionState == 
ConnectionState.LOST) || (newConnectionState == ConnectionState.SUSPENDED));
+        boolean isNegativeMessage = ((newConnectionState == 
ConnectionState.LOST) || (newConnectionState == ConnectionState.SUSPENDED) || 
(newConnectionState == ConnectionState.READ_ONLY));
         if ( !isNegativeMessage && 
initialConnectMessageSent.compareAndSet(false, true) )
         {
             localState = ConnectionState.CONNECTED;

Reply via email to