retry-request
Advanced tools
Comparing version 1.2.2 to 1.2.3
13
index.js
@@ -41,2 +41,11 @@ 'use strict'; | ||
var activeRequest; | ||
var retryRequest = { | ||
abort: function() { | ||
if (activeRequest && activeRequest.abort) { | ||
activeRequest.abort(); | ||
} | ||
} | ||
}; | ||
if (streamMode) { | ||
@@ -51,2 +60,4 @@ retryStream = through(); | ||
return retryStream; | ||
} else { | ||
return retryRequest; | ||
} | ||
@@ -76,3 +87,3 @@ | ||
} else { | ||
opts.request(requestOpts, onResponse); | ||
activeRequest = opts.request(requestOpts, onResponse); | ||
} | ||
@@ -79,0 +90,0 @@ } |
{ | ||
"name": "retry-request", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "Retry a request.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7041
103