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 2018/12/09 22:59:44 UTC
[2/3] curator git commit: Add a comment explaining
Add a comment explaining
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/ddfcbc1e
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/ddfcbc1e
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/ddfcbc1e
Branch: refs/heads/master
Commit: ddfcbc1e37fa9e8a9018f2c0d85b7f125efe173c
Parents: 97e7691
Author: randgalt <ra...@apache.org>
Authored: Thu Dec 6 12:43:16 2018 -0500
Committer: randgalt <ra...@apache.org>
Committed: Thu Dec 6 12:43:16 2018 -0500
----------------------------------------------------------------------
.../apache/curator/framework/recipes/leader/LeaderSelector.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/ddfcbc1e/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderSelector.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderSelector.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderSelector.java
index e505c91..0bb448a 100644
--- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderSelector.java
+++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/leader/LeaderSelector.java
@@ -448,7 +448,7 @@ public class LeaderSelector implements Closeable
if ( hasLeadership )
{
hasLeadership = false;
- boolean wasInterrupted = Thread.interrupted();
+ boolean wasInterrupted = Thread.interrupted(); // clear any interrupted tatus so that mutex.release() works immediately
try
{
mutex.release();