Commit 13aecdd
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 a4bbb63 commit 13aecdd
1 file changed
+7
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
131 | 134 | | |
132 | 135 | | |
133 | 136 | | |
| |||
0 commit comments