mock-server / mockserver

MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby. MockServer also includes a proxy that introspects all proxied traffic including encrypted SSL traffic and supports Port Forwarding, Web Proxying (i.e. HTTP proxy), HTTPS Tunneling Proxying (using HTTP CONNECT) and SOCKS Proxying (i.e. dynamic port forwarding).
http://mock-server.com
Apache License 2.0
4.57k stars 1.07k forks source link

Add method to stop Jetty's HttpClient #15

Closed tmatynia closed 10 years ago

tmatynia commented 10 years ago

In case of running MockServerClient in a standalone application, Jetty HttpClient's threads prevent application from quitting, despite of the fact that main thread has ended its work.

Extending API (with httpClient.stop() call) would solve the problem, as it works for me (I did that with use of reflection).

jamesdbloom commented 10 years ago

I've actually moved from Jetty HttpClient to Apache HttpClient as I find this more resilient. Once I have completed full load testing I will do a release, probably in the next four or five days. I have already uploaded this as a SNAPSHOT to Sonatype (https://oss.sonatype.org/index.html#nexus-search;quick~mockserver) in the 2.5-SNAPSHOT.

Please let me know if this doesn't fix the issue and re-open the ticket.

Also if you notice any further issues a pull request would be much appreciated.

Thanks,

James