webpush-java
webpush-java copied to clipboard
PushAsyncService start an HTTP client but provides no way to shut it down, leaving threads running
When I create an instance of PushAsyncService, it automatically creates an AsyncHttpClient instance upon initialization. The client spawns some threads that prevent my whole application from shutting down (e.g. if a fatal configuration error was encountered).
If there was a close() or stop() method to call I would do so, but there is none and httpClient is private so I cannot access it (at least without resorting to reflection). If I "cheat" and call close() on the private httpClient, the app proceeds to shut down normally.