Commit Graph

1 Commits

Author SHA1 Message Date
Daeyeon Jeong
9aef414b73
net: fix socket._getpeername
Fixes: https://github.com/nodejs/node/issues/43009

If calling `this._handle.getpeername` returns an error at the first
call, its result shouldn't be cached to `this._peername`.

Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com

PR-URL: https://github.com/nodejs/node/pull/43010
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
2022-07-25 09:09:49 +01:00