Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

fix: Stop Duplicate Response Handlers on Retries #502

Merged
merged 2 commits into from
Jan 26, 2022

Conversation

danielbankhead
Copy link
Member

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.

Fixes #493 馃

@danielbankhead danielbankhead requested review from a team as code owners January 26, 2022 18:54
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/gcs-resumable-upload API. label Jan 26, 2022
@danielbankhead danielbankhead changed the title fix: Stop duplicate reponse handlers on retries fix: Stop Duplicate Response Handlers on Retries Jan 26, 2022
Copy link
Contributor

@shaffeeullah shaffeeullah left a comment

Choose a reason for hiding this comment

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

woo! thanks, dan!!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: storage Issues related to the googleapis/gcs-resumable-upload API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

end to end: should resume an interrupted upload failed
2 participants