mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-18 05:41:05 -05:00
9eb8743014
[CE/SP] Hotfix 4.1.6 GitOrigin-RevId: dc023665d5e0868913eff2104de1acaf7038cb9f
30 lines
1.1 KiB
Diff
30 lines
1.1 KiB
Diff
diff --git a/node_modules/retry-request/index.js b/node_modules/retry-request/index.js
|
|
index 6cd6f65..39efb89 100644
|
|
--- a/node_modules/retry-request/index.js
|
|
+++ b/node_modules/retry-request/index.js
|
|
@@ -1,6 +1,6 @@
|
|
'use strict';
|
|
|
|
-var { PassThrough } = require('stream');
|
|
+var { PassThrough, pipeline } = require('stream');
|
|
var debug = require('debug')('retry-request');
|
|
var extend = require('extend');
|
|
|
|
@@ -164,7 +164,7 @@ function retryRequest(requestOpts, opts, callback) {
|
|
})
|
|
.on('complete', retryStream.emit.bind(retryStream, 'complete'));
|
|
|
|
- requestStream.pipe(delayStream);
|
|
+ pipeline(requestStream, delayStream, () => {});
|
|
} else {
|
|
activeRequest = opts.request(requestOpts, onResponse);
|
|
}
|
|
@@ -220,7 +220,7 @@ function retryRequest(requestOpts, opts, callback) {
|
|
// No more attempts need to be made, just continue on.
|
|
if (streamMode) {
|
|
retryStream.emit('response', response);
|
|
- delayStream.pipe(retryStream);
|
|
+ pipeline(delayStream, retryStream, () => {});
|
|
requestStream.on('error', function (err) {
|
|
retryStream.destroy(err);
|
|
});
|