mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-27 12:51:00 +00:00
778aa717d9
Revert "Update `@google-cloud/storage` and remove one patch" GitOrigin-RevId: a99b4cdf69804edb2bad0251d9ed693a9c1d0418
30 lines
1.2 KiB
Diff
30 lines
1.2 KiB
Diff
diff --git a/node_modules/@google-cloud/storage/node_modules/retry-request/index.js b/node_modules/@google-cloud/storage/node_modules/retry-request/index.js
|
|
index a293298..df21af6 100644
|
|
--- a/node_modules/@google-cloud/storage/node_modules/retry-request/index.js
|
|
+++ b/node_modules/@google-cloud/storage/node_modules/retry-request/index.js
|
|
@@ -1,6 +1,6 @@
|
|
'use strict';
|
|
|
|
-const {PassThrough} = require('stream');
|
|
+const { PassThrough, pipeline } = require('stream');
|
|
const debug = require('debug')('retry-request');
|
|
const extend = require('extend');
|
|
|
|
@@ -166,7 +166,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);
|
|
}
|
|
@@ -232,7 +232,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', err => {
|
|
retryStream.destroy(err);
|
|
});
|