got 6.7.0 → 6.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +7 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -73,8 +73,8 @@ function requestAsEventEmitter(opts) {
|
|
|
73
73
|
ee.emit('error', new got.RequestError(err, opts));
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
-
if (opts.
|
|
77
|
-
timedOut(req, opts.
|
|
76
|
+
if (opts.gotTimeout) {
|
|
77
|
+
timedOut(req, opts.gotTimeout);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
setImmediate(() => {
|
|
@@ -289,6 +289,11 @@ function normalizeArguments(url, opts) {
|
|
|
289
289
|
opts.followRedirect = true;
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
+
if (opts.timeout) {
|
|
293
|
+
opts.gotTimeout = opts.timeout;
|
|
294
|
+
delete opts.timeout;
|
|
295
|
+
}
|
|
296
|
+
|
|
292
297
|
return opts;
|
|
293
298
|
}
|
|
294
299
|
|