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: Close Open Handle for Empty Objects #2338

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

danielbankhead
Copy link
Contributor

🦕

@danielbankhead danielbankhead requested review from a team as code owners October 19, 2023 21:50
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: storage Issues related to the googleapis/nodejs-storage API. labels Oct 19, 2023
@@ -2173,8 +2173,14 @@ class File extends ServiceObject<File, FileMetadata> {
.on('end', () => {
// In the case of an empty file no data will be received before the end event fires
if (!receivedData) {
fs.openSync(destination, 'w');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These open handles were never closed out.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch!

@ddelgrosso1 ddelgrosso1 merged commit c51cd94 into main Oct 20, 2023
@ddelgrosso1 ddelgrosso1 deleted the fix-empty-object-memory-leak branch October 20, 2023 13:53
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. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants