From 875236fc0bfa8d3828ee88407614ff08fb76e9ee Mon Sep 17 00:00:00 2001 From: "C. T. Lin" Date: Wed, 14 Mar 2018 22:43:52 +0800 Subject: [PATCH] use net.Socket instead of net.Stream `net.Stream` is a undocumented legacy naming from node 0.x https://github.com/nodejs/node/blob/4ae320f2b3c745402955019d6a57a22ee2b8d3bd/lib/net.js#L1762 --- lib/connection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/connection.js b/lib/connection.js index 49121aedd..8744bbe32 100644 --- a/lib/connection.js +++ b/lib/connection.js @@ -19,7 +19,7 @@ var BINARY_MODE = 1 var Connection = function (config) { EventEmitter.call(this) config = config || {} - this.stream = config.stream || new net.Stream() + this.stream = config.stream || new net.Socket() this._keepAlive = config.keepAlive this.lastBuffer = false this.lastOffset = 0