You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
The following code will trigger the 'close' event twice on a socket in node v0.6.x. The close event was only fired once with v0.4.x. This was tested with Ubuntu and Mac OS X.
I can easily just not call socket.destroy() and the 'close' event will only be emitted once. However, I thought it was worth bringing up as this wasn't the case in v0.4.x and may be a regression issue.
The text was updated successfully, but these errors were encountered:
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.
Fixesnodejs#2223.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The following code will trigger the 'close' event twice on a socket in node v0.6.x. The close event was only fired once with v0.4.x. This was tested with Ubuntu and Mac OS X.
Output:
I can easily just not call
socket.destroy()
and the 'close' event will only be emitted once. However, I thought it was worth bringing up as this wasn't the case in v0.4.x and may be a regression issue.The text was updated successfully, but these errors were encountered: