Commit 7396fdb
committed
fix(proxy-retry): gate streamIdleTimeoutMs watchdog to retry modes (not off)
The watchdog (added in 02e295f) wraps response.body in a TransformStream
to bound idle on a hung upstream stream. But the interceptor
(server/interceptor.js) already reconstructs response.body via getReader()
+ a new ReadableStream for logging/live-streaming. Under CI's concurrent
load the watchdog's pipeThrough races that reconstruction and surfaces as
a spurious `fetch failed` → status 0 → 502 on a healthy streaming 200.
Gate the watchdog to retry modes only (serial/race/stagger), mirroring the
existing connectTimeoutMs off-exclusion. off mode is the legacy pass-through
path (no retry): the watchdog's value (bound idle on a hung stream) is
marginal there since the interceptor already observes the stream, and
gating it off restores byte-identical pre-watchdog streaming behavior.
Verified: proxy-server.test.js streaming-200 test passes 3/3 under
full test:cli flags (--test-force-exit, --test-timeout=120000);
proxy-retry-stream-idle.test.js still passes (hung-stream aborts in
serial mode, healthy stream does not).1 parent 31aa63e commit 7396fdb
1 file changed
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
499 | | - | |
500 | | - | |
501 | | - | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
502 | 509 | | |
503 | 510 | | |
504 | 511 | | |
| |||
0 commit comments