joyent/node — Issue #1872: identify if a net socket is still open
Author: shtylman
Created: 2011-10-12 17:30:24+00:00
State: open

Calling 'close' on a net socket twice results in an exception because it is already closed. However, I do not see a good way to identify if the socket is already closed to prevent client code from wanting to call close again. Previously, I used to hack around this by checking for the 'fd' but that is no longer available. Thoughts?