Skip to content

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

Description

@ronag

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.

Activity

  1. ronag commented on Aug 6, 2019

    @ronag
    MemberAuthor
  2. changed the title [-]writable/readable state initialised or not?[/-] [+]stream: writable/readable state initialised or not?[/+] on Aug 6, 2019
  3. mcollina commented on Aug 7, 2019

    @mcollina
    SponsorMember

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions