projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
faf7860
)
net: Initialize _connection, _handle in Socket ctor
author
isaacs
<i@izs.me>
Mon, 28 Jan 2013 16:54:27 +0000
(08:54 -0800)
committer
isaacs
<i@izs.me>
Mon, 28 Jan 2013 17:09:34 +0000
(09:09 -0800)
The better to reduce the hidden classes
lib/net.js
patch
|
blob
|
history
diff --git
a/lib/net.js
b/lib/net.js
index
966e4ce
..
ad20e70
100644
(file)
--- 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.