Update the network sdk and add more validations

This commit is contained in:
robbiezhang
2018-10-13 00:16:19 +00:00
parent d710e0391c
commit eb77d5686f
80 changed files with 16830 additions and 518 deletions

View File

@@ -234,7 +234,7 @@ func DoRetryForStatusCodes(attempts int, backoff time.Duration, codes ...int) Se
}
delayed := DelayWithRetryAfter(resp, r.Context().Done())
if !delayed && !DelayForBackoff(backoff, attempt, r.Context().Done()) {
return nil, r.Context().Err()
return resp, r.Context().Err()
}
// don't count a 429 against the number of attempts
// so that we continue to retry until it succeeds