Commit 29d8e35
committed
Fix potential race condition in FinishQuerying. Fixes #1341
If TryStartCancel were called between the two 'lock' blocks, the session could be put into an unexpected state. Instead, perform all state updates in the first 'lock' instead of deferring cleanup work. This should also improve efficiency for the common (not cancelled) path.
Signed-off-by: Bradley Grainger <[email protected]>1 parent e132a64 commit 29d8e35
1 file changed
+15
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
299 | | - | |
| 299 | + | |
300 | 300 | | |
301 | 301 | | |
| 302 | + | |
302 | 303 | | |
303 | 304 | | |
304 | 305 | | |
305 | 306 | | |
306 | 307 | | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
307 | 316 | | |
308 | 317 | | |
309 | 318 | | |
| |||
318 | 327 | | |
319 | 328 | | |
320 | 329 | | |
321 | | - | |
322 | 330 | | |
323 | | - | |
324 | | - | |
325 | | - | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
326 | 334 | | |
327 | | - | |
328 | | - | |
329 | | - | |
| 335 | + | |
| 336 | + | |
330 | 337 | | |
331 | 338 | | |
332 | 339 | | |
| |||
0 commit comments