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 "EADDRINUSE" error #4046

Merged
merged 1 commit into from Feb 21, 2023
Merged

Fix "EADDRINUSE" error #4046

merged 1 commit into from Feb 21, 2023

Conversation

bggbr
Copy link
Contributor

@bggbr bggbr commented Feb 3, 2023

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Proposed changes

It is necessary to partially modify the EADDRINUSE error handling code that occurs when ports are duplicated.

In node-red/red.js file, the if conditional statement that occurs when ports are duplicated is incorrect. The EADDRINUSE error is the "code" property of the err object, but is currently conditional on the "errno" property.

So EADDRINUSE errors are caught in Uncaught Exception.

Checklist

  • I have read the contribution guidelines
  • For non-bugfix PRs, I have discussed this change on the forum/slack team.
  • I have run grunt to verify the unit tests pass
  • I have added suitable unit tests to cover the new/changed functionality

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 3, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@knolleary
Copy link
Member

Well spotted. Thanks for the fix.

@coveralls
Copy link

Coverage Status

Coverage: 68.554%. Remained the same when pulling 892d21f on bggbr:master into adfc5b3 on node-red:master.

@knolleary knolleary merged commit 81ea67d into node-red:master Feb 21, 2023
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.

None yet

3 participants