net: don't emit 'close' event twice
Don't allow `socket.destroy()` to run twice. The self-destruct sequence itself is idempotent but it makes the 'close' and 'error' events fire more than once, which may confuse listeners. Fixes #2223.
parent
3ca05177
Please register or sign in to comment