fix for issue 712
diff --git a/asterix-events/src/main/java/edu/uci/ics/asterix/event/service/AsterixEventServiceUtil.java b/asterix-events/src/main/java/edu/uci/ics/asterix/event/service/AsterixEventServiceUtil.java
index f6765e9..3a7dbd4 100644
--- a/asterix-events/src/main/java/edu/uci/ics/asterix/event/service/AsterixEventServiceUtil.java
+++ b/asterix-events/src/main/java/edu/uci/ics/asterix/event/service/AsterixEventServiceUtil.java
@@ -507,12 +507,14 @@
boolean conflictFound = false;
AsterixInstance conflictingInstance = null;
for (AsterixInstance existing : existingInstances) {
- conflictFound = !existing.getState().equals(State.INACTIVE)
- && existing.getCluster().getMasterNode().getClusterIp().equals(masterIp);
+ if (existing.getState().equals(State.INACTIVE)) {
+ continue;
+ }
+ conflictFound = existing.getCluster().getMasterNode().getClusterIp().equals(masterIp);
if (conflictFound) {
conflictingInstance = existing;
break;
- }
+ }
for (Node n : existing.getCluster().getNode()) {
if (usedIps.contains(n.getClusterIp())) {
conflictFound = true;