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

dgram: remove listeners on bind error #30210

Closed
wants to merge 3 commits into from

Conversation

@addaleax
Copy link
Member

addaleax commented Nov 1, 2019

dgram: reset bind state before emitting error

This was previously done inconsistently, sometimes before, sometimes
after emitting the event.

dgram: remove listeners on bind error

This avoids piling up 'listening' event listeners if
.bind() fails repeatedly.

Fixes: #30209

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
addaleax added 2 commits Nov 1, 2019
This was previously done inconsistently, sometimes before, sometimes
after emitting the event.
This avoids piling up `'listening'` event listeners if
`.bind()` fails repeatedly.

Fixes: #30209
@nodejs-github-bot

This comment has been minimized.

@lpinca
lpinca approved these changes Nov 2, 2019
test/parallel/test-dgram-bind-error-repeat.js Outdated Show resolved Hide resolved
@cjihrig
cjihrig approved these changes Nov 3, 2019
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@jasnell
jasnell approved these changes Nov 6, 2019
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@addaleax

This comment has been minimized.

Copy link
Member Author

addaleax commented Nov 6, 2019

Landed in 99e874e 115792d

@addaleax addaleax closed this Nov 6, 2019
addaleax added a commit that referenced this pull request Nov 6, 2019
This was previously done inconsistently, sometimes before, sometimes
after emitting the event.

PR-URL: #30210
Fixes: #30209
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
addaleax added a commit that referenced this pull request Nov 6, 2019
This avoids piling up `'listening'` event listeners if
`.bind()` fails repeatedly.

Fixes: #30209

PR-URL: #30210
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@addaleax addaleax deleted the addaleax:dgram-bind-error branch Nov 6, 2019
@richardlau richardlau mentioned this pull request Nov 7, 2019
4 of 4 tasks complete
MylesBorins added a commit that referenced this pull request Nov 17, 2019
This was previously done inconsistently, sometimes before, sometimes
after emitting the event.

PR-URL: #30210
Fixes: #30209
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins added a commit that referenced this pull request Nov 17, 2019
This avoids piling up `'listening'` event listeners if
`.bind()` fails repeatedly.

Fixes: #30209

PR-URL: #30210
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@BridgeAR BridgeAR mentioned this pull request Nov 19, 2019
targos added a commit that referenced this pull request Dec 1, 2019
This was previously done inconsistently, sometimes before, sometimes
after emitting the event.

PR-URL: #30210
Fixes: #30209
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos added a commit that referenced this pull request Dec 1, 2019
This avoids piling up `'listening'` event listeners if
`.bind()` fails repeatedly.

Fixes: #30209

PR-URL: #30210
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@BethGriggs BethGriggs mentioned this pull request Dec 9, 2019
MylesBorins added a commit that referenced this pull request Dec 17, 2019
This was previously done inconsistently, sometimes before, sometimes
after emitting the event.

PR-URL: #30210
Fixes: #30209
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins added a commit that referenced this pull request Dec 17, 2019
This avoids piling up `'listening'` event listeners if
`.bind()` fails repeatedly.

Fixes: #30209

PR-URL: #30210
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@BethGriggs BethGriggs mentioned this pull request Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.