This repository was archived by the owner on Jun 21, 2023. It is now read-only.
Commit 3cebf10
committed
Fix race condition
The `ListenToCompletionState` subscription was triggering a navigation
request on the `Next` callback. Depending on how fast VS responds, this
can cause the Sync section to be disposed, along with the `UIController`
instance, before the handler returns, which would cause `UIController`
to crash.
Make sure we only navigate away once the `ListenToCompletionState`
observable is completed, and also tweak the way `Dispose` happens in
`UIController` to minimize races.1 parent ead03f2 commit 3cebf10
File tree
2 files changed
+15
-7
lines changed- src
- GitHub.App/Controllers
- GitHub.VisualStudio/TeamExplorer/Sync
2 files changed
+15
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
155 | 156 | | |
156 | 157 | | |
157 | 158 | | |
| |||
291 | 292 | | |
292 | 293 | | |
293 | 294 | | |
| 295 | + | |
294 | 296 | | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | 297 | | |
300 | 298 | | |
301 | 299 | | |
302 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
303 | 308 | | |
304 | 309 | | |
305 | 310 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
| 121 | + | |
121 | 122 | | |
| 123 | + | |
122 | 124 | | |
123 | | - | |
| 125 | + | |
| 126 | + | |
124 | 127 | | |
125 | 128 | | |
126 | 129 | | |
| |||
0 commit comments