[x] stream: eos avoid listeners when possible#28751
[x] stream: eos avoid listeners when possible#28751ronag wants to merge 4 commits intonodejs:masterfrom
Conversation
fe38aea to
bd553ab
Compare
|
ping @benjamingr |
mcollina
left a comment
There was a problem hiding this comment.
Would you mind adding a unit test?
9482e59 to
176ef57
Compare
|
@mcollina: Not sure I understand what to unit test here? Shouldn't existing unit tests already cover this? It's just an optimisation. Shouldn't be behavioural change. |
|
You can test that those listeners are not added in that case. |
|
@mcollina As far as I can see there are no tests for end-of-stream whatsoever? Or am I missing something? |
|
the tests are in test-stream-finished.js |
|
This is still waiting on the addition of the tests. |
176ef57 to
e9655f8
Compare
|
@jasnell: rebased, added test and added a few more conditions |
7d65c09 to
aefa28d
Compare
mcollina
left a comment
There was a problem hiding this comment.
I'm flagging it semver-major out of caution, this is supposed to work with users streams as well.
Any particular concern I can try to address? |
|
A review from @mafintosh would help. |
aefa28d to
f4b5ddb
Compare
f4b5ddb to
edb7e47
Compare
|
I'm putting this on ice for now. Will re-open later. |
This slightly improves performance and maintainability by applying legacy compat logic only when required.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes