-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Proper destroy #34
Proper destroy #34
Conversation
this._iterator.end(function (err2) { | ||
callback(err || err2) | ||
|
||
// TODO when the next readable-stream (mirroring node v10) is out: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. Didn't know about this.
stream.on('close', onClose) | ||
} | ||
|
||
return order |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
test.js
Outdated
}) | ||
|
||
iterator.next = function (cb) { | ||
cb(new Error('next')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe do process.nextTick(cb, new Error('next'))
? (Assuming we only run tests in node that is)
@ralphtheninja wait, what about this? |
Sorry for being sloppy. I'll fix. |
Np. I guess these could be considered fixes (because we're now api-compatible with streams):
But I'm not sure about:
|
Geesh I'm messing things up today. So, to be sure, I could release |
I don't really have energy left to think about this, but reverting sounds comforting ;) |
This reverts commit 9460d1b.
next()
error (closes Call destroy() on next() error #33)close
aftererror
(mimicking node 10) (before this PR,error
was the last event).destroy(err)
(node 8).destroy(err, callback)
(node 8).