-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
cluster: Can't passing http server to worker #15556
Comments
I don't think it's "use strict";
const child_process = require('child_process');
const subprocess = child_process.fork(__dirname + '/subprocess.js');
const server = require('http').createServer();
server.listen(1337, () => {
subprocess.send('server', server);
}); and this work as expected |
I can reproduce the issue with 8.5.0 and master. After applying the changes in #14221, your provided code runs again. EDIT: It's also worth mentioning that you're sending an HTTP server to the child process. That will come through on the child side as a net server, not HTTP server. |
It works in 8.6.0 so I'm closing this |
Passing http server instance to worker not working anymore on node v8.5.0, but works on v6.11.3
main.js
subprocess.js
The text was updated successfully, but these errors were encountered: