Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions ERRATA.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,22 @@ should be
```js
lineIndex = this._buffer.indexOf('\n');
```

### End of readable stream

Implicitly passing undefined as chunk to readable.push does not properly inform consumer that data output is finished.
Pass null instead.

Page 92, Listing 5.4

```js
// Done
this.push();
```

should be

```js
// Done
this.push(null);
```
2 changes: 1 addition & 1 deletion listings/streams/node-0.10/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function StatStream(limit) {
StatStream.prototype._read = function(size) {
if (this.limit === 0) {
// Done
this.push();
this.push(null);
} else {
this.push(util.inspect(process.memoryUsage())); //<co id="callout-streams-express-2" />
this.push('\n');
Expand Down