while (order.getStatus() != Status.VALID && count < 6) { if (order.getStatus() == Status.INVALID) { throw new LetsencryptException("The order failed"); throw new LetsencryptException("Problem updating the order status", e); LOGGER.info("[{}] Current order status: {}", count, order.getStatus()); ++count; if (order.getStatus() != Status.VALID) { LOGGER.error("Order status is still not valid after 1 minute. Status is {} ; problem is {} ; json: {}", order.getStatus(), order.getError(), order.getJSON().toString()); throw new LetsencryptException("Order status is still not valid after 1 minute. Status is " + order.getStatus());
while (order.getStatus() != Status.VALID) { Thread.sleep(3000L); order.update();