net: use cached peername to resolve remote fields
authorJames Hartig <james.hartig@grooveshark.com>
Tue, 10 Mar 2015 20:48:19 +0000 (16:48 -0400)
committercjihrig <cjihrig@gmail.com>
Mon, 16 Mar 2015 20:20:16 +0000 (16:20 -0400)
commit30666f22ca5041a991ab9e7311916ac218ed4c0f
treed3f78f428ed0df44890add84f513ee454a018bcc
parente6e616fdcb7e21a347fa6b5a3df6ef5c6f18c586
net: use cached peername to resolve remote fields

Allows socket.remote* properties to still be accessed even after the
socket is closed.

Fixes: https://github.com/joyent/node/issues/9287
PR-URL: https://github.com/joyent/node/pull/9366
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
lib/net.js
test/parallel/test-net-remote-address-port.js