Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
store: Call connection.close in PerAccountStore.dispose
This seems hygienic. It makes sense to explicitly clean up HTTP client resources when we know we'll be setting up a new client instance to replace the old one. (The dead-queue reload is currently the only path where PerAccountStore.dispose is called.) It will also make sense to clean up these resources when an account is logged out. That's a feature we'll be implementing soon, with PerAccountStore.dispose in that new path as well. The "TODO abort long-poll and close ApiConnection" was on UpdateMachine's dispose method, not PerAccountStore's. But since PerAccountStore is what owns the connection, its dispose method seemed like the more appropriate place to close the connection.
- Loading branch information