fix(storage): retry unwrapped EOFs (#12202) · googleapis/google-cloud-go@b2d42bd · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Commit b2d42bd

Browse files
authored
fix(storage): retry unwrapped EOFs (#12202)
1 parent f75e7db commit b2d42bd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

storage/invoke.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,15 @@ func ShouldRetry(err error) bool {
170170
return true
171171
}
172172
}
173+
// TODO: remove when https://github.com/golang/go/issues/53472 is resolved.
174+
// We don't want to retry io.EOF errors, since these can indicate normal
175+
// functioning terminations such as internally in the case of Reader and
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") {
180+
return true
181+
}
173182
case *net.DNSError:
174183
if e.IsTemporary {
175184
return true

0 commit comments

Comments
 (0)

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.