Skip to content

tls: use parent handle's close callback - #2991

Closed
indutny wants to merge 1 commit into
nodejs:masterfrom
indutny:fix/gh-2979
Closed

tls: use parent handle's close callback#2991
indutny wants to merge 1 commit into
nodejs:masterfrom
indutny:fix/gh-2979

Conversation

@indutny

Copy link
Copy Markdown
Member

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: #2979

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
@indutny

Copy link
Copy Markdown
MemberAuthor

cc @saghul

@indutny

Copy link
Copy Markdown
MemberAuthor

cc @nodejs/crypto @nodejs/collaborators

@brendanashworthbrendanashworth added the tls Issues and PRs related to the tls subsystem. label Sep 21, 2015
@saghul

Copy link
Copy Markdown
Member

@indutny#2979 (comment)

I'm not familiar with that code, but if it works as it says on the tin, it sounds good!

@jasnell

Copy link
Copy Markdown
Member

LGTM so long as CI is happy.

@indutny

Copy link
Copy Markdown
MemberAuthor

@jasnell thanks, let's wait for reporters to confirm that it fixes the problem for them.

@indutny

Copy link
Copy Markdown
MemberAuthor

@indutny

Copy link
Copy Markdown
MemberAuthor

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.

@bnoordhuis

Copy link
Copy Markdown
Member

Shouldn't this have some kind of regression test?

@indutny

Copy link
Copy Markdown
MemberAuthor

@bnoordhuis do you have any suggestions?

@bnoordhuis

Copy link
Copy Markdown
Member

Maybe a simple one that checks that the callback doesn't run before the 'close' event?

@indutny

Copy link
Copy Markdown
MemberAuthor

@bnoordhuis it doesn't on every platform except windows XP ;)

@bnoordhuis

Copy link
Copy Markdown
Member

Well, alright. LGTM. You should mention that in the commit log though.

@indutny

Copy link
Copy Markdown
MemberAuthor

Thank you, landing.

@indutny

Copy link
Copy Markdown
MemberAuthor

Landed in 51325c0, thank you!

@indutnyindutny closed this Oct 12, 2015
@indutny
indutny deleted the fix/gh-2979 branch October 12, 2015 17:29
indutny added a commit that referenced this pull request Oct 12, 2015
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>
indutny added a commit that referenced this pull request Oct 12, 2015
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>
@MylesBorins

Copy link
Copy Markdown
Contributor

landed in lts-v4.x-staging as af10df6

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tlsIssues and PRs related to the tls subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Getting the error "Assertion failed (wrap->ssl_) != (nullptr), file src\tls_wrap.cc, line 320" while module installation by npm

6 participants

@indutny@saghul@jasnell@bnoordhuis@MylesBorins@brendanashworth