fix: Add limited ref lifetime of incoming.socket attached to body: Readable#28
Merged
fix: Add limited ref lifetime of incoming.socket attached to body: Readable#28
incoming.socket attached to body: Readable#28Conversation
Merged
3 tasks
kitten
added a commit
to expo/expo
that referenced
this pull request
Feb 3, 2026
# Why In some scripts, `@vonovak` found that the main `untar` loop can leave the Node.js process without active handles and terminate early. It's tricky to reproduce, and I haven't been able to find this case yet. In theory, there should be other handles keeping the process open due to file IO work or the stack not being emptied in the same tick. However, the bump in version adds a patch that keeps the `incoming.socket` refed, since that's a reliable second way for there to be a guaranteed active resource for Node, and should have no negative consequences in cases where this is redundant. kitten/fetch-nodeshim#28 # How - Bump to `fetch-nodeshim@^0.4.4` - **Note:** Other lockfile changes are because #42827 wasn't sufficient. The lockfile wasn't only misaligned with the install, but needed another install after a first dedup, which our postinstall doesn't do # Test Plan - n/a # Checklist <!-- Please check the appropriate items below if they apply to your diff. --> - [x] I added a `changelog.md` entry and rebuilt the package sources according to [this short guide](https://github.com/expo/expo/blob/main/CONTRIBUTING.md#-before-submitting) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reattach the socket with
incoming.socket.ref()when the body is being read, and unref it again when the body is closed.