The WebhookManager is being called twice during shutdown, and each call can take two minutes to time out. We only need to stop it once.
ERROR 2017-12-14 18:30:36,005 [qtp1719519917-1486339|POST|http://localhost:8080/shutdown] com.flightstats.hub.app.HubServices - unable to stop servicecom.flightstats.hub.webhook.WebhookManager$WebhookIdleService
java.util.concurrent.TimeoutException: Timed out waiting for WebhookIdleService [STOPPING] to reach a terminal state. Current state: STOPPING
at com.google.common.util.concurrent.AbstractService.awaitTerminated(AbstractService.java:332)
at com.google.common.util.concurrent.AbstractIdleService.awaitTerminated(AbstractIdleService.java:199)
at com.flightstats.hub.app.HubServices.await(HubServices.java:84)
at com.flightstats.hub.app.HubServices.stop(HubServices.java:77)
at com.flightstats.hub.app.HubServices.stopAll(HubServices.java:64)
at com.flightstats.hub.app.ShutdownManager.shutdown(ShutdownManager.java:81)
at com.flightstats.hub.app.ShutdownResource.lambda$shutdown$0(ShutdownResource.java:19)
at com.flightstats.hub.app.LocalHostOnly.getResponse(LocalHostOnly.java:15)
at com.flightstats.hub.app.ShutdownResource.shutdown(ShutdownResource.java:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
The WebhookManager is being called twice during shutdown, and each call can take two minutes to time out. We only need to stop it once.
ERROR 2017-12-14 18:30:36,005 [qtp1719519917-1486339|POST|http://localhost:8080/shutdown] com.flightstats.hub.app.HubServices - unable to stop servicecom.flightstats.hub.webhook.WebhookManager$WebhookIdleService java.util.concurrent.TimeoutException: Timed out waiting for WebhookIdleService [STOPPING] to reach a terminal state. Current state: STOPPING at com.google.common.util.concurrent.AbstractService.awaitTerminated(AbstractService.java:332) at com.google.common.util.concurrent.AbstractIdleService.awaitTerminated(AbstractIdleService.java:199) at com.flightstats.hub.app.HubServices.await(HubServices.java:84) at com.flightstats.hub.app.HubServices.stop(HubServices.java:77) at com.flightstats.hub.app.HubServices.stopAll(HubServices.java:64) at com.flightstats.hub.app.ShutdownManager.shutdown(ShutdownManager.java:81) at com.flightstats.hub.app.ShutdownResource.lambda$shutdown$0(ShutdownResource.java:19) at com.flightstats.hub.app.LocalHostOnly.getResponse(LocalHostOnly.java:15) at com.flightstats.hub.app.ShutdownResource.shutdown(ShutdownResource.java:19) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)