diff --git a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/SeaTunnelServer.java b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/SeaTunnelServer.java index 4e256d2491f..e9dcdca779f 100644 --- a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/SeaTunnelServer.java +++ b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/SeaTunnelServer.java @@ -254,15 +254,13 @@ public boolean taskIsEnded(@NonNull TaskGroupLocation taskGroupLocation) { public boolean isMasterNode() { // must retry until the cluster have master node try { - return Boolean.TRUE.equals( - RetryUtils.retryWithException( - () -> nodeEngine.getThisAddress().equals(nodeEngine.getMasterAddress()), - new RetryUtils.RetryMaterial( - Constant.OPERATION_RETRY_TIME, - true, - exception -> - exception instanceof NullPointerException && isRunning, - Constant.OPERATION_RETRY_SLEEP))); + return RetryUtils.retryWithException( + () -> nodeEngine.getThisAddress().equals(nodeEngine.getMasterAddress()), + new RetryUtils.RetryMaterial( + Constant.OPERATION_RETRY_TIME, + true, + exception -> exception instanceof NullPointerException && isRunning, + Constant.OPERATION_RETRY_SLEEP)); } catch (InterruptedException e) { LOGGER.info("master node check interrupted"); return false;