Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8057 from howbazaar/fix-connection-resource-leak
Don't release resources until all current requests are complete. If a websocket connection is closed while the login is in process, the rpc package was releasing the apiHandler resources before all the current requests were finished. If one of those requests would add resources, like an agent pinger, these would be leaked. This branch changes the connection code to wait for all current requests to be finished before it kills the root object (which calls StopAll on the resources). ## Bug reference Other part of the fix for https://bugs.launchpad.net/juju/+bug/1731745
- Loading branch information