imroc / req

Simple Go HTTP client with Black Magic
https://req.cool
MIT License
4.12k stars 334 forks source link

fix: Cancel retry if the request failed due to a cancelled context #339

Closed mniehe closed 2 months ago

mniehe commented 2 months ago

The current implementation of the retry mechanism only tests if an error occurred and ignores what the error was. This PR adds a check to see if the original request failed because the attached context was cancelled.

imroc commented 2 months ago

thanks