Commit cad1cff
jarvisjiang
refactor: optimize timeout handling and code organization
- Replace manual AbortController+setTimeout with AbortSignal.timeout() and AbortSignal.any()
- Rename masterController to userController for clarity
- Extract helper functions: delay(), wrapAbortReason(), validateOptions()
- Extract processResponse() from doFetch() for better separation
- Move onRetry callback to execute after delay, right before retry request
- Add test for abortable fetch with timeout1 parent a0bffbf commit cad1cff
2 files changed
+241
-224
lines changed
0 commit comments