Commit bb6694d
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.
Also fixes the CI test matrix for the wasm pipeline:
- scripts/test.sh probes for --test-force-exit (Node >= 20.14/22) and runs
without it on Node 18, which rejects the flag.
- test/pipeline.js is skipped on Node 18: it needs --test-force-exit (the wasm
exporter keeps the loop alive) and the wasm HTTP client leaves a mock-agent
socket open that node:test cannot drain there. The pipeline wasm is fully
covered by the build-test-wasm job and the Node 20/22/24/26 runs, so this
loses no real coverage (it is platform/Node-independent wasm).1 parent 0857256 commit bb6694d
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
35 | 44 | | |
36 | 45 | | |
37 | 46 | | |
| |||
0 commit comments