-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tls: handle cases where the raw socket is destroyed #49980
Conversation
9c7a6df
to
c14baa7
Compare
cc: @pimterry |
Ensure that the `'close'` event is emitted on a `TLSSocket` when it is created from an existing raw `net.Socket` and the raw socket is not closed cleanly (destroyed). Refs: nodejs@048e0bec5147 Refs: nodejs#49902 (comment) Fixes: nodejs#49902
c14baa7
to
8e51895
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actual fix LGTM, I wonder if we shouldn't nextTick
the callback in this case since I thhinkk it can be called synchronously in this case and I'm not sure it was possible before
That said, "maybe not 100% inconsistently timed" is still much better than "not sure if called at all"
I thought about that, but it is called after the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Makes sense, LGTM 👍
Landed in b1ada0a |
Ensure that the `'close'` event is emitted on a `TLSSocket` when it is created from an existing raw `net.Socket` and the raw socket is not closed cleanly (destroyed). Refs: nodejs@048e0bec5147 Refs: nodejs#49902 (comment) Fixes: nodejs#49902 PR-URL: nodejs#49980 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
Ensure that the `'close'` event is emitted on a `TLSSocket` when it is created from an existing raw `net.Socket` and the raw socket is not closed cleanly (destroyed). Refs: 048e0bec5147 Refs: #49902 (comment) Fixes: #49902 PR-URL: #49980 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
Ensure that the `'close'` event is emitted on a `TLSSocket` when it is created from an existing raw `net.Socket` and the raw socket is not closed cleanly (destroyed). Refs: nodejs@048e0bec5147 Refs: nodejs#49902 (comment) Fixes: nodejs#49902 PR-URL: nodejs#49980 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
Ensure that the
'close'
event is emitted on aTLSSocket
when it iscreated from an existing raw
net.Socket
and the raw socket is notclosed cleanly (destroyed).
Refs: 048e0bec5147
Refs: #49902 (comment)
Fixes: #49902