Skip to content

Commit cad1cff

Browse files
author
jarvisjiang
committed
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 timeout
1 parent a0bffbf commit cad1cff

File tree

2 files changed

+241
-224
lines changed

2 files changed

+241
-224
lines changed

0 commit comments

Comments
 (0)