Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gcs-resumable-upload): Stop Duplicate Response Handlers on Retries #1764

Merged
merged 1 commit into from Jan 26, 2022

Conversation

danielbankhead
Copy link
Member

Porting fix from googleapis/gcs-resumable-upload#502:

Previously, startUploading would setup a 'response' event listener for passing responses to responseHandler - this is problematic in the event of a retry as the retry would create its own request (thus previous requests would trigger responseHandler as well).

Instead, we can accomplish the desired functionality by checking makeRequestStream's return value.

@danielbankhead danielbankhead requested review from a team as code owners January 26, 2022 19:18
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/nodejs-storage API. label Jan 26, 2022
Copy link
Contributor

@ddelgrosso1 ddelgrosso1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for porting this over

@danielbankhead danielbankhead merged commit fe44871 into main Jan 26, 2022
@danielbankhead danielbankhead deleted the handle-resumable-response-once branch January 26, 2022 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/nodejs-storage API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants