Terminate if unable to shutdown executor, wait a shorter time
@@ -229,7 +229,10 @@ public class ConfigServerBootstrap extends AbstractComponent implements Runnable
List<ApplicationId> failedDeployments = checkDeployments(deployments);
executor.shutdown();
- executor.awaitTermination(365, TimeUnit.DAYS); // Timeout should never happen
+ if (! executor.awaitTermination(5, TimeUnit.HOURS)) {
+ log.log(Level.SEVERE, () -> "Unable to shutdown " + executor + ", waited 5 hours. Exiting");
+ System.exit(1);
+ }
return failedDeployments;
}
