gcs-resumable-upload
Advanced tools
Comparing version 4.0.1 to 4.0.2
@@ -438,8 +438,2 @@ "use strict"; | ||
}); | ||
// This should be 'once' as `startUploading` can be called again for | ||
// multi chunk uploads and each request would have its own response. | ||
this.once('response', resp => { | ||
responseReceived = true; | ||
this.responseHandler(resp); | ||
}); | ||
let headers = {}; | ||
@@ -467,3 +461,7 @@ // If using multiple chunk upload, set appropriate header | ||
try { | ||
await this.makeRequestStream(reqOpts); | ||
const resp = await this.makeRequestStream(reqOpts); | ||
if (resp) { | ||
responseReceived = true; | ||
this.responseHandler(resp); | ||
} | ||
} | ||
@@ -641,5 +639,5 @@ catch (err) { | ||
const res = await this.authClient.request(combinedReqOpts); | ||
this.onResponse(res); | ||
const successfulRequest = this.onResponse(res); | ||
this.removeListener('error', errorCallback); | ||
return res; | ||
return successfulRequest ? res : null; | ||
} | ||
@@ -646,0 +644,0 @@ restart() { |
@@ -7,2 +7,9 @@ # Changelog | ||
### [4.0.2](https://github.com/googleapis/gcs-resumable-upload/compare/v4.0.1...v4.0.2) (2022-01-26) | ||
### Bug Fixes | ||
* Stop Duplicate Response Handlers on Retries ([#502](https://github.com/googleapis/gcs-resumable-upload/issues/502)) ([c5b3059](https://github.com/googleapis/gcs-resumable-upload/commit/c5b30594783e772c43b5eb5da01feb7cdb4d6094)) | ||
### [4.0.1](https://www.github.com/googleapis/gcs-resumable-upload/compare/v4.0.0...v4.0.1) (2022-01-06) | ||
@@ -9,0 +16,0 @@ |
{ | ||
"name": "gcs-resumable-upload", | ||
"version": "4.0.1", | ||
"version": "4.0.2", | ||
"description": "Upload a file to Google Cloud Storage with built-in resumable behavior", | ||
@@ -5,0 +5,0 @@ "repository": "googleapis/gcs-resumable-upload", |
Sorry, the diff of this file is not supported yet
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
100797
1119