-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stopService() leaves pooled connections open #86
Comments
In the
You could do something similar in the client creator you pass to Unfortunately the reason the service can't do this for you is exactly because client creation is indirected this way; the service can't know how your client is actually put together, so it can't reach into it to shut down a connection pool. Having said that, I realised that the way client creation works now (it changed after I originally wrote that code), connections from the connection pool will never be reused; so maybe we should create the default client with |
Oh, that's not quite right; a new client is created for each issuing run, but within that run the pool will be able to reuse the same connection for subsequent requests. Hmm. I'll think about this some more, there should be something better we can do; maybe add some kind of cleanup hook to the client object. |
But why Why not create a single client instance in |
As a workaround, I am creating the client ouside of In this way, there is a single client in use and I can call client.stop() before calling |
[Fixes #86] Close the HTTP pool when service is stopped.
Revert "[Fixes #86] Close the HTTP pool when service is stopped."
The merge that fixed this was reverted so this should have been reopened. Whoops! |
With the default client, a persistent
HTTPConnectionPool
is created for connections to the ACME directory. This pool isn't tracked, however, and whenstopService()
is called on the txacme service a pooled connection remains waiting on the reactor. This breaks my integration tests.The text was updated successfully, but these errors were encountered: