stream: fix comment for sync flag of ReadableState

It seems that the comment for sync flag of ReadableState is
copied from WritableState without modification.

PR-URL: https://github.com/nodejs/node/pull/11139
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
Wang Xinyong 2017-02-03 14:00:20 +08:00 committed by Matteo Collina
parent 1004b9b4ad
commit 202b07f414

View File

@ -63,10 +63,10 @@ function ReadableState(options, stream) {
this.endEmitted = false; this.endEmitted = false;
this.reading = false; this.reading = false;
// a flag to be able to tell if the onwrite cb is called immediately, // a flag to be able to tell if the event 'readable'/'data' is emitted
// or on a later tick. We set this to true at first, because any // immediately, or on a later tick. We set this to true at first, because
// actions that shouldn't happen until "later" should generally also // any actions that shouldn't happen until "later" should generally also
// not happen before the first write call. // not happen before the first read call.
this.sync = true; this.sync = true;
// whenever we return null, then we set a flag to say // whenever we return null, then we set a flag to say