From 940974ed039d3c9a8befe608d9c95b2ffdb457d3 Mon Sep 17 00:00:00 2001 From: Yazhong Liu Date: Mon, 14 Apr 2014 01:19:14 +0800 Subject: [PATCH] net: deduplicate Socket.prototype.address Signed-off-by: Fedor Indutny --- lib/net.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/net.js b/lib/net.js index 84c68330c1..8cc13bc12d 100644 --- a/lib/net.js +++ b/lib/net.js @@ -340,13 +340,7 @@ Socket.prototype.setKeepAlive = function(setting, msecs) { Socket.prototype.address = function() { - if (this._handle && this._handle.getsockname) { - var out = {}; - var err = this._handle.getsockname(out); - // TODO(bnoordhuis) Check err and throw? - return out; - } - return null; + return this._getsockname(); };