Skip to content

Commit 1d2ffc6

Browse files
committed
fixup
1 parent 6e5f6fc commit 1d2ffc6

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

lib/_http_incoming.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ function IncomingMessage(socket) {
8787
this.statusMessage = null;
8888
this.client = socket;
8989

90-
// TODO: Deprecate and remove.
9190
this._consuming = false;
9291
// Flag for when we decide that this message cannot possibly be
9392
// read by the user, so there's no point continuing to handle it.

lib/_http_server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ function resOnFinish(req, res, socket, state, server) {
804804
// If the user never called req.read(), and didn't pipe() or
805805
// .resume() or .on('data'), then we call req._dump() so that the
806806
// bytes will be pulled off the wire.
807-
if (!req.readableDidRead)
807+
if (!req._consuming && !req._readableState.resumeScheduled)
808808
req._dump();
809809

810810
// Make sure the requestTimeout is cleared before finishing.

lib/internal/streams/readable.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -527,8 +527,6 @@ Readable.prototype.read = function(n) {
527527
this.emit('data', ret);
528528
}
529529

530-
state.didRead = true;
531-
532530
return ret;
533531
};
534532

@@ -832,9 +830,7 @@ function pipeOnDrain(src, dest) {
832830

833831
if ((!state.awaitDrainWriters || state.awaitDrainWriters.size === 0) &&
834832
EE.listenerCount(src, 'data')) {
835-
// TODO(ronag): Call resume() instead?
836833
state.flowing = true;
837-
state.didRead = true;
838834
flow(src);
839835
}
840836
};
@@ -982,7 +978,6 @@ Readable.prototype.resume = function() {
982978
function resume(stream, state) {
983979
if (!state.resumeScheduled) {
984980
state.resumeScheduled = true;
985-
state.didRead = true;
986981
process.nextTick(resume_, stream, state);
987982
}
988983
}

0 commit comments

Comments
 (0)