return;
log.debug("Stopping list of services for Service [" + serviceName + "], services [" + services + "]");
for (String relatedServiceName : services) {
try {
Service relatedService = new Service(relatedServiceName);
int relatedServiceStatus = relatedService.getStatus();
if (!(relatedServiceStatus == Service.SERVICE_STOPPED || relatedServiceStatus == Service.SERVICE_STOP_PENDING)) {
log.debug("Stopping Service [" + relatedServiceName + "]");
relatedService.stop(this.timeout);
log.debug("Service stopped [" + relatedServiceName + "]");
relatedService.close();
}
} catch (Exception e) {
log.warn("Unable to stop [" + relatedServiceName + "] from the list [" + services
+ "]. Will continue with the rest. Cause:" + e);
}