Github user Randgalt commented on a diff in the pull request:
https://github.com/apache/curator/pull/242#discussion_r155071186
--- Diff:
curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java
---
@@ -973,6 +981,33 @@ void performBackgroundOperation(OperationAndData<?>
operationAndData)
}
}
+ @VisibleForTesting
+ volatile long sleepAndQueueOperationSeconds = 1;
+
+ private void sleepAndQueueOperation(OperationAndData<?>
operationAndData) throws InterruptedException
+ {
+ operationAndData.sleepFor(sleepAndQueueOperationSeconds,
TimeUnit.SECONDS);
+ if ( queueOperation(operationAndData) )
--- End diff --
Yes, the only reason it wouldn't be queued is that the handle is closing,
etc. `false` is the indication that no further operations are needed.
---