Skip to content

Commit

Permalink
Removed net.Error.Temporary (#536)
Browse files Browse the repository at this point in the history
  • Loading branch information
FileGo authored May 27, 2022
1 parent 92fd623 commit 8bb4f73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lists/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 115,7 @@ func (d *HTTPDownloader) DownloadFile(link string) (io.ReadCloser, error) {
return fmt.Errorf("got status code %d", resp.StatusCode)
}
var netErr net.Error
if errors.As(httpErr, &netErr) && (netErr.Timeout() || netErr.Temporary()) {
if errors.As(httpErr, &netErr) && netErr.Timeout() {
return &TransientError{inner: netErr}
}

Expand Down
2 changes: 1 addition & 1 deletion resolver/upstream_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 266,7 @@ func (r *UpstreamResolver) Resolve(request *model.Request) (response *model.Resp
retry.RetryIf(func(err error) bool {
var netErr net.Error

return errors.As(err, &netErr) && (netErr.Timeout() || netErr.Temporary())
return errors.As(err, &netErr) && netErr.Timeout()
}),
retry.OnRetry(func(n uint, err error) {
logger.WithFields(logrus.Fields{
Expand Down

0 comments on commit 8bb4f73

Please sign in to comment.