CURATOR-498 303/head
authorrandgalt <randgalt@apache.org>
Tue, 29 Jan 2019 18:22:50 +0000 (13:22 -0500)
committerrandgalt <randgalt@apache.org>
Tue, 29 Jan 2019 18:22:58 +0000 (13:22 -0500)
Missed a check on doProtected in checkSetSessionId()

curator-framework/src/main/java/org/apache/curator/framework/imps/ProtectedMode.java

index 2a4500e..cd33ab0 100644 (file)
@@ -76,7 +76,7 @@ class ProtectedMode
      */
     void checkSetSessionId(CuratorFrameworkImpl client, CreateMode createMode) throws Exception
     {
-        if ( (sessionId == 0) && createMode.isEphemeral() )
+        if ( doProtected && (sessionId == 0) && createMode.isEphemeral() )
         {
             sessionId = client.getZooKeeper().getSessionId();
         }