Skip to content

Commit

Permalink
fix: returning out
Browse files Browse the repository at this point in the history
Signed-off-by: Daeyeon Jeong [email protected]
  • Loading branch information
daeyeon committed May 23, 2022
1 parent fd20648 commit df47a46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ Socket.prototype._getpeername = function() {
const out = {};
const err = this._handle.getpeername(out);
// FIXME(bnoordhuis) Throw when the return value is not 0?
if (err) return {};
if (err) return out;
this._peername = out;
}
return this._peername;
Expand Down

0 comments on commit df47a46

Please sign in to comment.