-
Notifications
You must be signed in to change notification settings - Fork 36
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
dicer writable never ends if bad multipart #2
Comments
Ok, this should be fixed in the master branch -- an error event will be emitted. Note that I've also changed the 'end' event for Dicer to 'finish' to keep in line with the documented events for a Writable stream. |
Thank you! It works! And another similar issue. If Readable stream emits an error, I expect that dicer Writable will stop parsing and emit this error on themself instance and should not emit 'finish' if any 'error' event emitted |
@golyshevd I looked at Writable's code in node core while I was working on this and from what I can tell 'finish' is still emitted even when 'error' is emitted. So I was trying to keep that same behavior. |
hm, surprising, anyway, thanks! |
stream.pipe(dicer);
never fireddicer
'end'
event if broken multipart passed.I had to write this code to solve the problem
I expected SyntaxError or another on 'error' dicer event
The text was updated successfully, but these errors were encountered: