From 780c0f841cc47a48af5ec5285d1e03afb17e3043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Sat, 1 Apr 2017 04:04:09 -0700 Subject: [PATCH] fix(retry): skip retries if body is a stream for ANY method --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index c01e2ef..c14936b 100644 --- a/index.js +++ b/index.js @@ -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) @@ -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)