- Notifications
You must be signed in to change notification settings - Fork3
Commite5d9dc1
authored
fix: fix Downloader to dispose tempFile and use synchronous IO (#81)
Fixescoder/internal#598There is a possible race where if the cancellation token is expired, `Download()` never gets called and the tempFile is never disposed of (at least until GC). We also switch to synchronous IO so that a pending overlapped write won't block the deletion.These issues can cause races in our tests when we try to clean up the directory.1 parent75cdfd0 commite5d9dc1
File tree
2 files changed
+23
-20
lines changed- Tests.Vpn.Service
- Vpn.Service
2 files changed
+23
-20
lines changedLines changed: 11 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
442 | 442 |
| |
443 | 443 |
| |
444 | 444 |
| |
| 445 | + | |
| 446 | + | |
445 | 447 |
| |
446 | 448 |
| |
447 | 449 |
| |
448 |
| - | |
449 |
| - | |
450 |
| - | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
451 | 454 |
| |
452 | 455 |
| |
453 | 456 |
| |
454 | 457 |
| |
455 | 458 |
| |
456 | 459 |
| |
457 |
| - | |
| 460 | + | |
458 | 461 |
| |
459 |
| - | |
| 462 | + | |
| 463 | + | |
460 | 464 |
| |
461 |
| - | |
| 465 | + | |
| 466 | + | |
462 | 467 |
| |
463 | 468 |
| |
464 | 469 |
| |
|
Lines changed: 12 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
453 | 453 |
| |
454 | 454 |
| |
455 | 455 |
| |
456 |
| - | |
457 |
| - | |
458 |
| - | |
459 |
| - | |
460 |
| - | |
461 |
| - | |
462 |
| - | |
463 |
| - | |
464 |
| - | |
465 |
| - | |
466 |
| - | |
467 |
| - | |
468 |
| - | |
| 456 | + | |
469 | 457 |
| |
470 | 458 |
| |
471 | 459 |
| |
472 |
| - | |
| 460 | + | |
473 | 461 |
| |
474 | 462 |
| |
475 | 463 |
| |
476 | 464 |
| |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
477 | 475 |
| |
478 | 476 |
| |
479 | 477 |
| |
|
0 commit comments
Comments
(0)