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
improvement
  • Loading branch information
indutny committed Aug 26, 2015
commit bc821080b2034662bdb1c4fdf83abcafb19331e5
11 changes: 9 additions & 2 deletions lib/_http_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,10 @@ Server.prototype.setTimeout = function(msecs, callback) {
exports.Server = Server;


function noop() {
}


function connectionListener(socket) {
var self = this;
var outgoing = [];
Expand Down Expand Up @@ -328,7 +332,10 @@ function connectionListener(socket) {
// Override on to unconsume on `data`, `readable` listeners
socket.on = socketOnWrap;

parser.consume(socket._handle._externalStream);
var external = socket._handle._externalStream;
if (external)
parser.consume(external);
external = null;
parser[kOnExecute] = onParserExecute;

// TODO(isaacs): Move all these functions out of here
Expand All @@ -349,7 +356,7 @@ function connectionListener(socket) {
onParserExecuteCommon(ret, undefined);

// Kick-off next ticks
setImmediate(function() {});
setImmediate(noop);
}

function onParserExecuteCommon(ret, d) {
Expand Down