Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
http2: improve and simplify _read
  • Loading branch information
jasnell committed Nov 22, 2017
commit 97d488d51ca79831eb56acf652cc85db19604ba6
8 changes: 2 additions & 6 deletions lib/internal/http2/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1355,16 +1355,12 @@ class Http2Stream extends Duplex {
}

_read(nread) {
if (this[kID] === undefined) {
this.once('ready', this._read.bind(this, nread));
return;
}
if (this.destroyed) {
this.push(null);
return;
}
_unrefActive(this);
process.nextTick(handleFlushData, this[kHandle]);
if (this[kHandle] !== undefined)
process.nextTick(handleFlushData, this[kHandle]);
}

// Submits an RST-STREAM frame to shutdown this stream.
Expand Down