Commit 7075045
committed
store [nfc]: Use try/finally to clear _perAccountStoresLoading[accountId]
In GlobalStore.perAccount, the loadPerAccount future can throw, and
in that case the `_perAccountStoresLoading.remove` in these lines of
code hasn't been getting called.
That's only a latent bug, currently, because loadPerAccount only
throws if the account was logged out, and we always do a
`_perAccountStoresLoading.remove` on logout (in
GlobalStore.removeAccount).
But we'd like to add another case where the loadPerAccount future
throws (disallow connecting to ancient servers), which doesn't
involve logout / removeAccount. So this try/finally will be
important for that case.1 parent 0a2273c commit 7075045
1 file changed
+7
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
154 | 157 | | |
155 | 158 | | |
156 | 159 | | |
| |||
0 commit comments