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

http: remove default 'drain' listener on upgrade #18866

Closed
wants to merge 1 commit into from

Conversation

lpinca
Copy link
Member

@lpinca lpinca commented Feb 19, 2018

Ensure that the default 'drain' listener is removed before the 'connect' or 'upgrade' event is emitted.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

http

@nodejs-github-bot nodejs-github-bot added the http Issues or PRs related to the http subsystem. label Feb 19, 2018
@lpinca
Copy link
Member Author

lpinca commented Feb 19, 2018

@@ -62,6 +62,7 @@ server.listen(0, common.mustCall(() => {
assert(!socket.onend);
assert.strictEqual(socket.listeners('connect').length, 0);
assert.strictEqual(socket.listeners('data').length, 0);
assert.strictEqual(socket.listenerCount('drain'), 0);
Copy link
Member

Choose a reason for hiding this comment

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

I guess these could be kept consistent if we want to?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, I actually wanted to change all of them to listenerCount but that's a perfect code+learn exercise, I guess.

Ensure that the default `'drain'` listener is removed before the
`'connect'` or `'upgrade'` event is emitted.
@lpinca lpinca force-pushed the remove/drain-listener branch from c7e5a54 to 575da74 Compare February 19, 2018 14:19
@BridgeAR BridgeAR added fast-track PRs that do not need to wait for 48 hours to land. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels Feb 20, 2018
@BridgeAR
Copy link
Member

New CI before landing: https://ci.nodejs.org/job/node-test-pull-request/13329/

@BridgeAR
Copy link
Member

Landed in 2b7f920 🎉

BridgeAR pushed a commit to BridgeAR/node that referenced this pull request Feb 22, 2018
Ensure that the default `'drain'` listener is removed before the
`'connect'` or `'upgrade'` event is emitted.

PR-URL: nodejs#18866
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
@BridgeAR BridgeAR closed this Feb 22, 2018
@lpinca lpinca deleted the remove/drain-listener branch February 22, 2018 16:19
addaleax pushed a commit to addaleax/node that referenced this pull request Feb 26, 2018
Ensure that the default `'drain'` listener is removed before the
`'connect'` or `'upgrade'` event is emitted.

PR-URL: nodejs#18866
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
addaleax pushed a commit that referenced this pull request Feb 26, 2018
Ensure that the default `'drain'` listener is removed before the
`'connect'` or `'upgrade'` event is emitted.

PR-URL: #18866
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
@addaleax addaleax mentioned this pull request Feb 27, 2018
MylesBorins pushed a commit that referenced this pull request Apr 13, 2018
Ensure that the default `'drain'` listener is removed before the
`'connect'` or `'upgrade'` event is emitted.

PR-URL: #18866
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
@MylesBorins MylesBorins mentioned this pull request May 2, 2018
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
Ensure that the default `'drain'` listener is removed before the
`'connect'` or `'upgrade'` event is emitted.

PR-URL: nodejs#18866
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. fast-track PRs that do not need to wait for 48 hours to land. http Issues or PRs related to the http subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants