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/03/19 19:30:47 UTC
git commit: Avoid erroneous 'Could not cancel' warning produced by
cache tasks
Repository: curator
Updated Branches:
refs/heads/CURATOR-98 [created] b17e6ffb0
Avoid erroneous 'Could not cancel' warning produced by cache tasks
This closes #3
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/b17e6ffb
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/b17e6ffb
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/b17e6ffb
Branch: refs/heads/CURATOR-98
Commit: b17e6ffb0e553144ee9cbb0852a23c57ded3425f
Parents: b34aaaa
Author: Joe Littlejohn <jo...@nokia.com>
Authored: Wed Mar 19 15:43:00 2014 +0000
Committer: randgalt <ra...@apache.org>
Committed: Wed Mar 19 13:29:51 2014 -0500
----------------------------------------------------------------------
.../java/org/apache/curator/utils/CloseableExecutorService.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/b17e6ffb/curator-client/src/main/java/org/apache/curator/utils/CloseableExecutorService.java
----------------------------------------------------------------------
diff --git a/curator-client/src/main/java/org/apache/curator/utils/CloseableExecutorService.java b/curator-client/src/main/java/org/apache/curator/utils/CloseableExecutorService.java
index 5e51449..e9d2547 100644
--- a/curator-client/src/main/java/org/apache/curator/utils/CloseableExecutorService.java
+++ b/curator-client/src/main/java/org/apache/curator/utils/CloseableExecutorService.java
@@ -148,7 +148,7 @@ public class CloseableExecutorService implements Closeable
{
Future<?> future = iterator.next();
iterator.remove();
- if ( !future.cancel(true) )
+ if ( !future.isDone() && !future.isCancelled() && !future.cancel(true) )
{
log.warn("Could not cancel " + future);
}