Commit 0857256
committed
fix(capabilities): unref the wasm transport sleep timer so the host can exit
The wasm exporter races a sleep(timeout) against each HTTP request as a timeout
guard (and reuses it for retry backoff). On a fast success the timer is
abandoned but, being reffed, kept the Node process alive for up to the request
timeout (5 minutes) after the last flush. unref the timer: an in-flight request
refs the event loop on its own, so an abandoned/standalone timeout timer must
not block process exit.
This also fixes the Node 18 CI test jobs: scripts/test.sh now probes for
--test-force-exit (Node >= 20.14/22) and runs without it on Node 18, which
rejects the flag as unknown. With the unref above, node:test exits cleanly on
Node 18 regardless.1 parent b9303c1 commit 0857256
2 files changed
Lines changed: 18 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
13 | 20 | | |
14 | 21 | | |
15 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
17 | 22 | | |
18 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
19 | 28 | | |
20 | 29 | | |
21 | 30 | | |
| |||
0 commit comments