-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
node: ensure that streams2 won't .end()
stdin
#1233
Conversation
Stdin is purely read-only stream. Although, `net.Socket` might be used to create it if stdin is in fact a Pipe or TCP socket, the `stream.Duplex` should not try to call `.end()` on it. Fix: nodejs#1068
CI: https://jenkins-iojs.nodesource.com/job/iojs+any-pr+multi/359/ . I hope it'll help :) |
Yay, build appears to be green (except one spurious failure)! |
@@ -1 +1,2 @@ | |||
debugger; |
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.
Is this intentional?
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.
Nope, thanks! Fixed.
@@ -630,6 +630,8 @@ | |||
writable: false | |||
}); | |||
} | |||
// Ensure that Streams2 won't try to `.end()` the stream |
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.
nit: might rephrase this comment to make sure that stdin can't be .end()-ed
, since we're on streams3 now.
LGTM other than comment nit (which can be ignored if desired.) |
Stdin is purely read-only stream. Although, `net.Socket` might be used to create it if stdin is in fact a Pipe or TCP socket, the `stream.Duplex` should not try to call `.end()` on it. Fix: #1068 PR-URL: #1233 Reviewed-By: Chris Dickinson <[email protected]>
Thank you, landed in 9ae1a61 ! |
I don't think this is a good fix. |
@bnoordhuis not really, it means the same thing as it was before this patch. |
Stdin is purely read-only stream. Although,
net.Socket
might be usedto create it if stdin is in fact a Pipe or TCP socket, the
stream.Duplex
should not try to call.end()
on it.Fix: #1068
cc @rvagg