@google-cloud+storage++retry-request+7.0.2.patch 1.3 KB

123456789101112131415161718192021222324252627282930
  1. 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
  2. index 2fae107..5721c54 100644
  3. --- a/node_modules/@google-cloud/storage/node_modules/retry-request/index.js
  4. +++ b/node_modules/@google-cloud/storage/node_modules/retry-request/index.js
  5. @@ -1,6 +1,6 @@
  6. 'use strict';
  7. -const {PassThrough} = require('stream');
  8. +const { PassThrough, pipeline } = require('stream');
  9. const extend = require('extend');
  10. let debug = () => {};
  11. @@ -185,7 +185,7 @@ function retryRequest(requestOpts, opts, callback) {
  12. .on('complete', (...params) => handleFinish(params))
  13. .on('finish', (...params) => handleFinish(params));
  14. - requestStream.pipe(delayStream);
  15. + pipeline(requestStream, delayStream, () => {});
  16. } else {
  17. activeRequest = opts.request(requestOpts, onResponse);
  18. }
  19. @@ -251,7 +251,7 @@ function retryRequest(requestOpts, opts, callback) {
  20. // No more attempts need to be made, just continue on.
  21. if (streamMode) {
  22. retryStream.emit('response', response);
  23. - delayStream.pipe(retryStream);
  24. + pipeline(delayStream, retryStream, () => {});
  25. requestStream.on('error', err => {
  26. retryStream.destroy(err);
  27. });