-
Notifications
You must be signed in to change notification settings - Fork 273
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
Fix: Exit http server on php exit #1714
Fix: Exit http server on php exit #1714
Conversation
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.
I was able to make this work but we need to add the close() call as well.
I'll take care of this and add a test case tomorrow as well.
Looking good, thank you so much! For posterity, once we have more of these cleanup callbacks, we may want to introduce something like |
Motivation for the change, related issues
Calling the
php.exit
caused a hanging connection. This had affect in tests, and leaving open connections around.Implementation details
Attach the HTTP server that we spawn to handle websocket connections to the PHP instance.
When we call
.exit
we use the attached instance to close the connections.Testing Instructions (or ideally a Blueprint)
php-wasm/node
andphp-wasm/universal
/dist
php-wasm folder and runnpm link
npm link @php-wasm/node
andnpm link @php-wam/universal
npm install