Commit f9006c4
committed
feat(core): use experiment flags for default fetch timeouts
Replaces hardcoded fetch timeouts in `undici`'s Agent and ProxyAgent with
newly defined experiment flags `DEFAULT_REQUEST_TIMEOUT` and
`DEFAULT_TOTAL_REQUEST_TIMEOUT`. This allows for remote configuration
of request timeouts.
- Added `DEFAULT_REQUEST_TIMEOUT` and `DEFAULT_TOTAL_REQUEST_TIMEOUT` to `ExperimentFlags`.
- Updated `fetch.ts` to use `DEFAULT_REQUEST_TIMEOUT` for headers and body timeouts.
- Added unit tests to verify `setGlobalProxy` correctly applies the timeout flags.1 parent e77b22e commit f9006c4
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1593 | 1593 | | |
1594 | 1594 | | |
1595 | 1595 | | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
1596 | 1604 | | |
1597 | 1605 | | |
1598 | 1606 | | |
| |||
0 commit comments