Commit 894bcab
committed
fix: URI handling race condition when creating polling jobs
- when opening a URI, multiple polling jobs could be triggered on different
Coder deployments if Toolbox starts from scratch. This happens because Toolbox
takes longer to complete its initial plugin initialization, while the URI
handling logic runs faster and doesn't wait properly for the plugin to be ready,
leading to an early polling job. Meanwhile, once Toolbox finishes its initialization,
it also triggers another polling job.
- this patch properly waits for the plugin initialization and properly cancel the initial
polling job, which is then replaced by the URI handling polling job.1 parent 0b49bcb commit 894bcab
File tree
2 files changed
+16
-9
lines changed- src/main/kotlin/com/coder/toolbox
- util
2 files changed
+16
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
125 | 131 | | |
126 | 132 | | |
127 | 133 | | |
| |||
238 | 244 | | |
239 | 245 | | |
240 | 246 | | |
241 | | - | |
| 247 | + | |
242 | 248 | | |
243 | 249 | | |
244 | 250 | | |
| |||
324 | 330 | | |
325 | 331 | | |
326 | 332 | | |
327 | | - | |
328 | 333 | | |
329 | 334 | | |
330 | 335 | | |
| |||
Lines changed: 9 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
152 | 154 | | |
153 | 155 | | |
154 | 156 | | |
155 | | - | |
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| |||
366 | 367 | | |
367 | 368 | | |
368 | 369 | | |
369 | | - | |
370 | | - | |
371 | | - | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
372 | 374 | | |
373 | 375 | | |
0 commit comments