|
19 | 19 | * exactly the bug. Disarming leaves one enforcement point instead of two that |
20 | 20 | * disagree. |
21 | 21 | * |
22 | | - * Note the pinned runtime accepts only the boolean/zero form. Bun 1.3.14 |
23 | | - * ignores a positive numeric `timeout` — verified against the pinned version by |
24 | | - * observing that `{ timeout: 1000 }` does not abort a request that takes 3s to |
25 | | - * answer — so passing the deadline as a number silently changes nothing. The |
26 | | - * numeric idle-deadline form exists only on Bun's `main`. Do not "improve" this |
27 | | - * to pass the deadline through until the pinned version supports it, and |
28 | | - * re-verify with that probe if you do. |
| 22 | + * The pinned runtime accepts only the boolean/zero form. Measured on Bun 1.3.14 |
| 23 | + * against a server that withholds response headers, so the numbers below are |
| 24 | + * the real deadline rather than an inferred one: |
| 25 | + * |
| 26 | + * no option -> THREW 300028ms (TimeoutError) <- the 300s default |
| 27 | + * timeout: false -> RESOLVED 310031ms <- disarmed |
| 28 | + * timeout: 1000 -> RESOLVED 3008ms on a 3s request <- numeric ignored |
| 29 | + * |
| 30 | + * So a positive numeric `timeout` silently changes nothing on this version; the |
| 31 | + * numeric idle-deadline form and `BUN_CONFIG_HTTP_IDLE_TIMEOUT` both exist only |
| 32 | + * on Bun's `main`. Do not "improve" this into a numeric pass-through until the |
| 33 | + * pinned version supports it, and re-measure with the probe above if you do. |
| 34 | + * |
| 35 | + * `bun-types@1.3.14` does not declare `timeout` on `BunFetchRequestInit` even |
| 36 | + * though the runtime honors the boolean form — the types lag the runtime, which |
| 37 | + * is why the interface below is declared locally rather than imported. |
29 | 38 | * |
30 | 39 | * Node's undici has no equivalent default and ignores the option, so this is |
31 | 40 | * safe on both runtimes. |
|
0 commit comments