GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||
GeezerVison is showing github.com — net: fix ambiguity in EOF handling by indutny · Pull Request #9066 · nodejs/node Conversation
|
|
Nice one. I imagine there is very little chance to write a unit test for this, right? if not, LGTM. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@mcollina I actually just got an idea on how to do this, but wanted to gather some preliminary feedback first. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Added test. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@indutny Test not showing up here... (Forgot to push maybe? Or need to force-push maybe?) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
`end` MUST always be emitted **before** `close`. However, if a handle will invoke `uv_close_cb` immediately, or in the same JS tick - `close` may be emitted first.
9920f17 to
6e38e76
Compare
|
@Trott sorry, just pushed it! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Stress test to make sure there's no unexpected flakiness hidden in the test somewhere: https://ci.nodejs.org/job/node-stress-single-test/994/ (Failures on the two win2008* jobs can be ignored, I think.) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
LGTM if no CI oddities arise. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| process.on('exit', () => { | ||
| assert.deepStrictEqual(events, [ 'end', 'close' ]); | ||
| }); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Would something like this work?
s.on('end', common.mustCall(() => { s.on('close', common.mustCall(() => {})); }));
... so you can get rid of events and the exit listener.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
On one hand - yes, on the other - if this test will ever error, the error message will be more informative.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
LGTM |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM with green CI
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Landed in 31196ea, thank you! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
`end` MUST always be emitted **before** `close`. However, if a handle will invoke `uv_close_cb` immediately, or in the same JS tick - `close` may be emitted first. PR-URL: #9066 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ilkka Myller <[email protected]>
`end` MUST always be emitted **before** `close`. However, if a handle will invoke `uv_close_cb` immediately, or in the same JS tick - `close` may be emitted first. PR-URL: #9066 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ilkka Myller <[email protected]>
|
@indutny this lands cleanly on v4 and v6. Is this something we should consider backporting? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@thealphanerd yep |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
`end` MUST always be emitted **before** `close`. However, if a handle will invoke `uv_close_cb` immediately, or in the same JS tick - `close` may be emitted first. PR-URL: #9066 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ilkka Myller <[email protected]>
`end` MUST always be emitted **before** `close`. However, if a handle will invoke `uv_close_cb` immediately, or in the same JS tick - `close` may be emitted first. PR-URL: #9066 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ilkka Myller <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.