Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(765)

Unified Diff: common/retry/transient.go

Issue 1605363002: common/prpc, tools/cmd/cproto: prpc client (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: rebased and addressed comments Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « common/retry/limited.go ('k') | server/prpc/auth.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/retry/transient.go
diff --git a/common/retry/transient.go b/common/retry/transient.go
index c76c8850054329ff7c2e377ef876c72cdf8a123d..ed2a3a01926a70d0f8004c4f3a223b3c602cfcdc 100644
--- a/common/retry/transient.go
+++ b/common/retry/transient.go
@@ -29,7 +29,11 @@ func (i *transientOnlyIterator) Next(ctx context.Context, err error) time.Durati
// TransientOnly returns an Iterator that wraps another Iterator. It will fall
// through to the wrapped Iterator if a transient error is encountered;
// otherwise, it will not retry.
+// Returns nil if f is nil.
func TransientOnly(f Factory) Factory {
+ if f == nil {
+ return nil
+ }
return wrap(f, func(it Iterator) Iterator {
return &transientOnlyIterator{it}
})
« no previous file with comments | « common/retry/limited.go ('k') | server/prpc/auth.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698