From 4c78a52a3a0758fe71810689504220c6b6aeea01 Mon Sep 17 00:00:00 2001 From: isaacs Date: Mon, 28 Jan 2013 08:54:27 -0800 Subject: [PATCH] net: Initialize _connection, _handle in Socket ctor The better to reduce the hidden classes --- lib/net.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/net.js b/lib/net.js index 966e4ced5e..ad20e70f6d 100644 --- a/lib/net.js +++ b/lib/net.js @@ -127,6 +127,9 @@ function initSocketHandle(self) { function Socket(options) { if (!(this instanceof Socket)) return new Socket(options); + this._connecting = false; + this._handle = null; + switch (typeof options) { case 'number': options = { fd: options }; // Legacy interface.