Commit 1ed2d70
committed
fix(shells): ref the kill-grace timer so Windows shutdown drain can finish
The second windows-latest hang after the OAuth queue fix had the same
shape: shutdown-drain's tests passed and the isolate process never
exited. The kill-grace wait inside waitForBackgroundShellClose was an
unref'd timer, and Bun on Windows stops servicing unref'd timers when a
pending promise is the only remaining work — so drainAndShutdown waited
on a resolution that never came. The grace timer is now deliberately
ref'd: it self-clears within its two-second bound (or earlier on close),
so it cannot keep a healthy process alive, while the long-lived idle and
absolute deadline timers stay unref'd as before. The test fixture timer
gets the same treatment.1 parent 1ace71a commit 1ed2d70
2 files changed
Lines changed: 13 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
344 | 349 | | |
345 | 350 | | |
346 | 351 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
123 | | - | |
124 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
125 | 129 | | |
126 | 130 | | |
127 | 131 | | |
| |||
0 commit comments