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

Error correction "Cannot read properties of undefined" #3825

Closed
wants to merge 1 commit into from

Conversation

SolT31
Copy link

@SolT31 SolT31 commented Nov 12, 2024

Error correction "Cannot read properties of undefined (reading ' autoSelectFamilyAttemptedAddresses')"

This relates to...

Rationale

Changes

Features

Bug Fixes

Breaking Changes and Deprecations

Status

@SolT31 SolT31 mentioned this pull request Nov 12, 2024
Copy link
Member

@mcollina mcollina 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 opening a PR! Can you please add a unit test?

@@ -181,11 +181,12 @@ const setupConnectTimeout = process.platform === 'win32'

let s1 = null
let s2 = null
const socket = socketWeakRef.deref()
Copy link
Member

Choose a reason for hiding this comment

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

This will keep a strong reference of the socket around, preventing its collection. Instead, deference it in the timeout.

Copy link
Author

Choose a reason for hiding this comment

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

Yes. This will prevent the error occurring in "onConnectTimeout" due to the missing socket argument.

@Uzlopak
Copy link
Contributor

Uzlopak commented Nov 12, 2024

Already fixed by #3751

@Uzlopak Uzlopak closed this Nov 12, 2024
@SolT31 SolT31 deleted the bugfix/#3752 branch November 13, 2024 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants