Skip to content

Commit

Permalink
Fix logic
Browse files Browse the repository at this point in the history
  • Loading branch information
mizosoft committed May 15, 2024
1 parent b475922 commit 15c5db7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public static RedisClusterSession start(int masterCount, int replicasPerMaster)
} catch (IOException closeEx) {
e.addSuppressed(closeEx);
}
throw new IOException("Can't operate on started cluster", e);
throw new IOException("Started cluster is inoperable", e);
}
}

Expand All @@ -230,7 +230,7 @@ private static void checkHealth(RedisClusterSession cluster) throws InterruptedE
retriesLeft--;

var message = e.getMessage();
if ((message != null && message.contains("CLUSTERDOWN")) || retriesLeft <= 0) {
if (message == null || !message.contains("CLUSTERDOWN") || retriesLeft <= 0) {
throw e;
}

Expand Down

0 comments on commit 15c5db7

Please sign in to comment.