-
Notifications
You must be signed in to change notification settings - Fork 69
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
close versus end event #27
Comments
no. this is to avoid leaks. |
idk. this does sound like an issue, because technically the node.js core docs are clear in that |
yeah i guess i disagree with node's official definition. my definition of
which is pretty much how most streams in node function. but if there's a stream you can't fix, show it to us! |
yea. it is probably an issue here, but right now it's not a super priority for us to fix ourselves :) |
I meet this "close before end" problem with spawning processes ; it seems to depend on how the binary handles the stdin/out, and on the size of the output. I'll keep looking. Regarding the definition, it makes sense to me to receive an event when the underlying ressource is closed, which hopefully happens before all the data is piped downstream. I can Imagine reading a file (<64K so everything will fit into the watermark for files) and then send it to a very slow consumer (a serial cable to configure a device for example) ; I don't want the file to be kept open if everything is already buffered) ; but that is more a "concept idea" than the bug I am trying to fix. I'll close this for now thanks for the feedback. |
I have an issue with raw-body on the way it handles the 'close' event.
currently, if I
then the buffer is empty because 'close' triggers a cleanup.
According to node.js documentation regarding the 'close' event, it is "Emitted when the underlying resource (for example, the backing file descriptor) has been closed. Not all streams will emit this."
to me, this means that the "underlying" ressource has been closed (a file descriptor for example). it does not mean that 'end' has already been called if there is still data in the internal stream buffer.
can we remove the handling of close altogether ?
The text was updated successfully, but these errors were encountered: