diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java index 2373751afbb1..3a6c526b996d 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java @@ -540,8 +540,8 @@ private void initialize() { if (!this.isSourceActive()) { setSourceStartupStatus(false); - if (Thread.currentThread().isInterrupted()) { - // If source is not running and thread is interrupted this means someone has tried to + if (Thread.currentThread().isInterrupted() || !this.sourceRunning) { + // If source is not running or thread is interrupted this means someone has tried to // remove this peer. return; } @@ -570,8 +570,8 @@ private void initialize() { if (!this.isSourceActive()) { setSourceStartupStatus(false); - if (Thread.currentThread().isInterrupted()) { - // If source is not running and thread is interrupted this means someone has tried to + if (Thread.currentThread().isInterrupted() || !this.sourceRunning) { + // If source is not running or thread is interrupted this means someone has tried to // remove this peer. return; }