Skip to content
This repository has been archived by the owner on Jun 12, 2022. It is now read-only.

Commit

Permalink
fix(retry): skip retries if body is a stream for ANY method
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Apr 1, 2017
1 parent 4156d5a commit 780c0f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ function remoteFetch (uri, opts) {
if (res.status >= 500) {
if (req.method === 'POST') {
return res
} else if (req.method === 'PUT' && req.body instanceof Stream) {
} else if (req.body instanceof Stream) {
return res
} else {
return retryHandler(res)
Expand All @@ -242,7 +242,7 @@ function remoteFetch (uri, opts) {
} else if (res.status >= 500) {
if (req.method === 'POST') {
return res
} else if (req.method === 'PUT' && req.body instanceof Stream) {
} else if (req.body instanceof Stream) {
return res
} else {
return retryHandler(res)
Expand Down

0 comments on commit 780c0f8

Please sign in to comment.