Browse Source

net: deduplicate Socket.prototype.address

Signed-off-by: Fedor Indutny <fedor@indutny.com>
v0.11.13-release
Yazhong Liu 11 years ago
committed by Fedor Indutny
parent
commit
940974ed03
  1. 8
      lib/net.js

8
lib/net.js

@ -340,13 +340,7 @@ Socket.prototype.setKeepAlive = function(setting, msecs) {
Socket.prototype.address = function() { Socket.prototype.address = function() {
if (this._handle && this._handle.getsockname) { return this._getsockname();
var out = {};
var err = this._handle.getsockname(out);
// TODO(bnoordhuis) Check err and throw?
return out;
}
return null;
}; };

Loading…
Cancel
Save