-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
net: wait for shutdown to complete before closing #32491
Conversation
When not allowing half open, handle.close would be invoked before shutdown has been called and completed causing a potential data race. Fixes: nodejs#32486 (comment)
This is WIP I'm expecting it to fail in CI on win10 (#32487) |
CI: https://ci.nodejs.org/job/node-test-pull-request/30072/ (:yellow_heart:) |
@@ -65,9 +65,7 @@ function onexit() { | |||
{ type: 'TCPCONNECTWRAP', | |||
id: 'tcpconnect:1', triggerAsyncId: 'tcp:1' }, | |||
{ type: 'TCPWRAP', id: 'tcp:2', triggerAsyncId: 'tcpserver:1' }, | |||
{ type: 'TLSWRAP', id: 'tls:2', triggerAsyncId: 'tcpserver:1' }, | |||
{ type: 'Immediate', id: 'immediate:1', triggerAsyncId: 'tcp:2' }, | |||
{ type: 'Immediate', id: 'immediate:2', triggerAsyncId: 'tcp:1' }, |
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.
The order of Immediate here is platform dependent...
@addaleax PTAL, I've applied the required win10 fix. I think this should be able to land as a patch? |
I don't understand why the |
Landed in 138eb32 |
When not allowing half open, handle.close would be invoked before shutdown has been called and completed causing a potential data race. Fixes: #32486 (comment) PR-URL: #32491 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
When not allowing half open, handle.close would be invoked before shutdown has been called and completed causing a potential data race. Fixes: #32486 (comment) PR-URL: #32491 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
When not allowing half open, handle.close would be invoked before shutdown has been called and completed causing a potential data race. Fixes: #32486 (comment) PR-URL: #32491 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
When not allowing half open, handle.close would be invoked before shutdown has been called and completed causing a potential data race. Fixes: #32486 (comment) PR-URL: #32491 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
When not allowing half open, handle.close would be
invoked before shutdown has been called and
completed causing a potential data race.
Fixes: #32486 (comment)
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes