Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Not documented stream.unshift(): is not allowed after 'end' event. #14596

Closed
socketpair opened this issue Apr 10, 2015 · 4 comments
Closed

Not documented stream.unshift(): is not allowed after 'end' event. #14596

socketpair opened this issue Apr 10, 2015 · 4 comments

Comments

@socketpair
Copy link

  1. Not documented: stream.unshift(): is not allowed after 'end' event
  2. Not documented: stream.read() will NOT raise error when called after 'end' event

Such strange behaviour should be documented (and maybe fixed :)

@jasnell
Copy link
Member

jasnell commented Jun 25, 2015

The documentation on this can certainly be improved. @socketpair ... are you interested in putting together a quick PR?

@socketpair
Copy link
Author

No, my english is bad + I do not know if that behaviour is intended (i.e. bug or not)

jasnell added a commit to jasnell/node-joyent that referenced this issue Jul 1, 2015
per: nodejs#14596

1. document that a runtime error will occur if you attempt
   to unshift after the end event
2. document that calling read after the end event will return
   null and will not trigger a runtime error
@jasnell
Copy link
Member

jasnell commented Jul 1, 2015

I'll get a PR in for this shortly

@jasnell
Copy link
Member

jasnell commented Jul 6, 2015

PR opened. Will land shortly once it's reviewed.

@jasnell jasnell closed this as completed Jul 6, 2015
jasnell added a commit that referenced this issue Jul 10, 2015
per: #14596

1. document that a runtime error will occur if you attempt
   to unshift after the end event
2. document that calling read after the end event will return
   null and will not trigger a runtime error

Reviewed-By: James M Snell <[email protected]>
PR-URL: #25635
jasnell added a commit to jasnell/node-joyent that referenced this issue Jul 10, 2015
per: nodejs#14596

1. document that a runtime error will occur if you attempt
   to unshift after the end event
2. document that calling read after the end event will return
   null and will not trigger a runtime error

Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs#25635
jasnell added a commit that referenced this issue Aug 4, 2015
per: #14596

1. document that a runtime error will occur if you attempt
   to unshift after the end event
2. document that calling read after the end event will return
   null and will not trigger a runtime error

Reviewed-By: James M Snell <[email protected]>
PR-URL: #25591
jasnell added a commit to jasnell/node that referenced this issue Aug 4, 2015
per: nodejs/node-v0.x-archive#14596

1. document that a runtime error will occur if you attempt
   to unshift after the end event
2. document that calling read after the end event will return
   null and will not trigger a runtime error

Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node-v0.x-archive#25591
jBarz pushed a commit to ibmruntimes/node that referenced this issue Nov 4, 2016
per: nodejs#14596

1. document that a runtime error will occur if you attempt
   to unshift after the end event
2. document that calling read after the end event will return
   null and will not trigger a runtime error

Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs#25591
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants