-
Notifications
You must be signed in to change notification settings - Fork 110
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
File stream ends before node-expat stream ends #66
Comments
This issue still happens, is there any plan to fix it or should I create a PR? |
This is what I did in order to get around this bug:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems when you use
pause
andresume
functions to run async operations when you get anendElement
event, xml-stream continues reading. I sometimes have problems when readable file stream ends before node-expat stream completes.In my code, I transform detected
endElement
objects and write them asynchronously to a file usingpause
andresume
xml-stream methods during write operation. In large files, when I handleend
event I end the writable file stream. But after that, I get moreendElement
events and I get next error (cannot write in a closed writable stream).I am working in a PR to mitigate this error.
The text was updated successfully, but these errors were encountered: