Closed Nerbeer closed 2 years ago
Hmm that's a good catch. Yes, probably makes sense to just move that increment into the block with sendChunk
. Really I keep thinking we should move to tracking attempt count on individual chunks, but that's a much bigger change.
Want to submit a PR for this?
Hi! I noticed some strange behaviour of retry attempts when request is failed due to network error and idk if it's intended or not :)
attemptCount
is updated only when we receive response, but if we get network error or CORS error in my case,attemptCount
is not changing and we keep spamming server with requests. Shouldn'tattempts
control this case too?