test: ensure finish is emitted before destroy#33137
Closed
ronag wants to merge 1 commit intonodejs:masterfrom
Closed
test: ensure finish is emitted before destroy#33137ronag wants to merge 1 commit intonodejs:masterfrom
ronag wants to merge 1 commit intonodejs:masterfrom
Conversation
Adds a test to ensure that 'finish' is emitted before the socket is destroyed by allow half-open enforcer. Refs: nodejs@3c07b17#commitcomment-38810268
Member
Author
|
review with ignore whitespace |
Member
Author
|
This is a problem on v14. So we should backport this test together with a fix. Unfortunately the semver-major fix on master (#31806) cannot be backported. |
ronag
commented
Apr 29, 2020
| socket.on('end', common.mustCall(() => { | ||
| assert(!socket.destroyed); | ||
| })); | ||
| socket.end('asd'); |
Member
Author
There was a problem hiding this comment.
calling end() here is the main difference with the previous test
lpinca
reviewed
Apr 29, 2020
|
|
||
| { | ||
| const server = net.createServer(common.mustCall((socket) => { | ||
| socket.end(Buffer.alloc(1024)); |
Member
There was a problem hiding this comment.
Is this needed now that the end() is also called on the client? Shouldn't this socket be resumed to consume the data sent by the client?
Member
Author
There was a problem hiding this comment.
Not sure, it does trigger the bug on v14 in the current form though...
Collaborator
4 tasks
Member
|
@nodejs/streams @nodejs/http @nodejs/http2 this needs some reviews. It's open for quite a while by now. |
Collaborator
8ae28ff to
2935f72
Compare
Member
|
Ping @nodejs/streams |
trivikr
approved these changes
Jun 20, 2020
Collaborator
ronag
added a commit
that referenced
this pull request
Jun 24, 2020
Adds a test to ensure that 'finish' is emitted before the socket is destroyed by allow half-open enforcer. Refs: 3c07b17#commitcomment-38810268 PR-URL: #33137 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Member
Author
|
Landed in 2ccf15b |
2 tasks
This was referenced Jan 31, 2023
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.
Adds a test to ensure that 'finish' is emitted
before the socket is destroyed by allow half-open
enforcer.
Refs: 3c07b17#commitcomment-38810268
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes