stream: fix destroy(err, cb) regression#13156
Conversation
There was a problem hiding this comment.
Does the missing semicolon pass make lint?
There was a problem hiding this comment.
nope, I have some leftover files with linting errors under bench, and I didn't spot those :(. Updated
1f399e1 to
502bfaf
Compare
There was a problem hiding this comment.
It might be worth doing some assertion on the error received here.
502bfaf to
c294477
Compare
|
cc @lpinca |
|
CI (without linting errors): https://ci.nodejs.org/job/node-test-pull-request/8232/ |
There was a problem hiding this comment.
If this statement is important you should assert it (set a field on expected on line 177 and assert it's there in line 175).
c294477 to
f4813b1
Compare
There was a problem hiding this comment.
Personally I like it that if a function is used it's a strong indicator that you need this bound.
There was a problem hiding this comment.
This is just a plain old ES5 function. I tend to say the contrary: I use () => {} as a strong indicator that I need this to stay the same.
There was a problem hiding this comment.
IMHO If the cb should stay undocumented don't put it in the signature, extract it from arguments.
My IDE (WebStorm) will intellisense it's presence.
Fixed a regression that caused the callback passed to destroy()
to not be called if the stream was already destroyed.
This caused a regression on the ws module in CITGM, as discovered
by @refack.
Fixes: websockets/ws#1118
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
stream, net