vendor: update all dependencies

This commit is contained in:
Nick Craig-Wood
2017-07-23 08:51:42 +01:00
parent 0b6fba34a3
commit eb87cf6f12
2008 changed files with 352617 additions and 1004734 deletions
+7 -4
View File
@@ -119,8 +119,11 @@ func isRetryable(err error) bool {
}
// errContextCanceled returns *spanner.Error for canceled context.
func errContextCanceled(lastErr error) error {
return spannerErrorf(codes.Canceled, "context is canceled, lastErr is <%v>", lastErr)
func errContextCanceled(ctx context.Context, lastErr error) error {
if ctx.Err() == context.DeadlineExceeded {
return spannerErrorf(codes.DeadlineExceeded, "%v, lastErr is <%v>", ctx.Err(), lastErr)
}
return spannerErrorf(codes.Canceled, "%v, lastErr is <%v>", ctx.Err(), lastErr)
}
// extractRetryDelay extracts retry backoff if present.
@@ -162,7 +165,7 @@ func runRetryable(ctx context.Context, f func(context.Context) error) error {
// Do context check here so that even f() failed to do
// so (for example, gRPC implementation bug), the loop
// can still have a chance to exit as expected.
return errContextCanceled(funcErr)
return errContextCanceled(ctx, funcErr)
default:
}
funcErr = f(ctx)
@@ -177,7 +180,7 @@ func runRetryable(ctx context.Context, f func(context.Context) error) error {
}
select {
case <-ctx.Done():
return errContextCanceled(funcErr)
return errContextCanceled(ctx, funcErr)
case <-time.After(b):
}
retryCount++