diff --git a/lib/_http_agent.js b/lib/_http_agent.js index 25ff16fea186da..dcb5ed376de835 100644 --- a/lib/_http_agent.js +++ b/lib/_http_agent.js @@ -341,6 +341,7 @@ Agent.prototype.keepSocketAlive = function keepSocketAlive(socket) { Agent.prototype.reuseSocket = function reuseSocket(socket, req) { debug('have free socket'); + req.reusedSocket = true; socket.ref(); }; diff --git a/lib/_http_incoming.js b/lib/_http_incoming.js index ad3699cc44dc33..dc7602b913ae83 100644 --- a/lib/_http_incoming.js +++ b/lib/_http_incoming.js @@ -42,6 +42,7 @@ function IncomingMessage(socket) { this._readableState.readingMore = true; this.socket = socket; + this.reusedSocket = false; this.httpVersionMajor = null; this.httpVersionMinor = null;