@@ -174,9 +174,9 @@ func ShouldRetry(err error) bool {
|
174 | 174 | // We don't want to retry io.EOF errors, since these can indicate normal |
175 | 175 | // functioning terminations such as internally in the case of Reader and |
176 | 176 | // externally in the case of iterator methods. However, the linked bug |
177 | | -// requires us to retry EOFs that it causes. We can distinguish |
178 | | -// EOFs caused by the bug because they are not wrapped correctly. |
179 | | -if !errors.Is(err, io.EOF) && strings.Contains(err.Error(), "EOF") { |
| 177 | +// requires us to retry the EOFs that it causes, which should be wrapped |
| 178 | +// in net or url errors. |
| 179 | +if errors.Is(err, io.EOF) { |
180 | 180 | return true |
181 | 181 | } |
182 | 182 | case *net.DNSError: |
|