-
Notifications
You must be signed in to change notification settings - Fork 30k
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: use parent handle's close callback #2991
Conversation
When closing the child TLSWrap handle - wait for the proper parent's handle close callback invocation. `uv_close_cb` may be invoked much later than the next libuv tick, depending on the platform. Fix: nodejs#2979
cc @saghul |
cc @nodejs/crypto @nodejs/collaborators |
I'm not familiar with that code, but if it works as it says on the tin, it sounds good! |
LGTM so long as CI is happy. |
@jasnell thanks, let's wait for reporters to confirm that it fixes the problem for them. |
Let's land this, just in case cc @nodejs/crypto . It is quite hard for XP people to get the build, and probably easier to just roll this out. |
Shouldn't this have some kind of regression test? |
@bnoordhuis do you have any suggestions? |
Maybe a simple one that checks that the callback doesn't run before the 'close' event? |
@bnoordhuis it doesn't on every platform except windows XP ;) |
Well, alright. LGTM. You should mention that in the commit log though. |
Thank you, landing. |
Landed in 51325c0, thank you! |
When closing the child TLSWrap handle - wait for the proper parent's handle close callback invocation. `uv_close_cb` may be invoked much later than the next libuv tick, depending on the platform. The only platform that currently seem to defer `uv_close_cb` is Windows XP. This behavior was not observed on other Windows systems, and is not possible on Unixes. Fix: #2979 PR-URL: #2991 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
When closing the child TLSWrap handle - wait for the proper parent's handle close callback invocation. `uv_close_cb` may be invoked much later than the next libuv tick, depending on the platform. The only platform that currently seem to defer `uv_close_cb` is Windows XP. This behavior was not observed on other Windows systems, and is not possible on Unixes. Fix: #2979 PR-URL: #2991 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
landed in lts-v4.x-staging as af10df6 |
When closing the child TLSWrap handle - wait for the proper parent's
handle close callback invocation.
uv_close_cb
may be invoked muchlater than the next libuv tick, depending on the platform.
Fix: #2979