Skip to content
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

stream: writable/readable state initialised or not? #28991

Closed
ronag opened this issue Aug 6, 2019 · 2 comments
Closed

stream: writable/readable state initialised or not? #28991

ronag opened this issue Aug 6, 2019 · 2 comments

Comments

@ronag
Copy link
Member

ronag commented Aug 6, 2019

I've noticed a bit of an inconsistency in regards to the writable/readable state.

Sometimes we check whether it is trurthy and sometimes we don't. What is the thought here? I'm not even sure how/when the state object is not initialised since it is done in the constructor and it is never re-assigned.

Property accesses seem to usually (not always) check for unitialized value while methods in general don't perform any check.

@ronag
Copy link
Member Author

ronag commented Aug 6, 2019

ping @mcollina

@ronag ronag changed the title writable/readable state initialised or not? stream: writable/readable state initialised or not? Aug 6, 2019
@mcollina
Copy link
Member

mcollina commented Aug 7, 2019

IMHO we should remove all those checks. I think those part of the code can be refactored a bit as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants