title: RestEasyClient JAX RS possible resource leak if not done correctly
body: <p>Issue:
  I had a rest client that was supposed to send request to a URL. The java application was a standalone java Application ( started with java -jar ) and then on exit all application context were closed. but the application would end but not shutdown and the PID remained for the java process. 
  On each request I was doing an async call and getting the response in an InvocationCallback implementation. </p>
  
  <pre><code> client = new ResteasyClientBuilder().connectTimeout(timeout, TimeUnit.SECONDS).readTimeout(timeout, TimeUnit.SECONDS).httpEngine(engine).build();
  ResteasyWebTarget resteasyWebTarget = client.target(url));
          Future&lt;Response&gt;  response = resteasyWebTarget.
                            request().
                            headers(headers).
                            async().
                            get(restResponseCallback);
  </code></pre>
  
  <p>Even after one test call to  test URL my app would not close Even though all contexts were closed.</p>
  
  <p>The application contexts were closed as described in 
  <a href="https://stackoverflow.com/questions/51627974/spring-applicationcontext-close-doesnot-shut-down-application">Spring ApplicationContext.close() doesnot shut down application</a></p>