Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
v1.10.1
- fixup in formatting
- Allow setting keepalive in node clients
v1.11.0
- retry even if there is an error
4 changes: 2 additions & 2 deletions _hardcoded/doer.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (SingleRetryPolicy) Backoffs() []time.Duration {
// Retry will retry non-POST, non-PATCH requests that 5XX.
// TODO: It does not currently retry any errors returned by net/http.Client's `Do`.
func (SingleRetryPolicy) Retry(req *http.Request, resp *http.Response, err error) bool {
if err != nil || req.Method == "POST" || req.Method == "PATCH" ||
if req.Method == "POST" || req.Method == "PATCH" ||
resp.StatusCode < 500 {
return false
}
Expand All @@ -114,7 +114,7 @@ func (ExponentialRetryPolicy) Backoffs() []time.Duration {
// Retry will retry non-POST, non-PATCH requests that 5XX.
// TODO: It does not currently retry any errors returned by net/http.Client's `Do`.
func (ExponentialRetryPolicy) Retry(req *http.Request, resp *http.Response, err error) bool {
if err != nil || req.Method == "POST" || req.Method == "PATCH" ||
if req.Method == "POST" || req.Method == "PATCH" ||
resp.StatusCode < 500 {
return false
}
Expand Down
4 changes: 2 additions & 2 deletions clients/js/genjs.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const exponentialRetryPolicy = {
return ret;
},
retry(requestOptions, err, res) {
if (err || requestOptions.method === "POST" ||
if (requestOptions.method === "POST" ||
requestOptions.method === "PATCH" ||
res.statusCode < 500) {
return false;
Expand All @@ -132,7 +132,7 @@ const singleRetryPolicy = {
return [1000];
},
retry(requestOptions, err, res) {
if (err || requestOptions.method === "POST" ||
if (requestOptions.method === "POST" ||
requestOptions.method === "PATCH" ||
res.statusCode < 500) {
return false;
Expand Down