Skip to content

cannot pass TLSSocket to child process #865

Closed
@endel

Description

@endel
  • Node.js Version: 8.6.0
  • OS: OSX

How can I pass a TLSSocket to a child process? (created from "https" module)

I'm having this issue:

internal/child_process.js:630
        throw new errors.TypeError('ERR_INVALID_HANDLE_TYPE');
        ^

TypeError [ERR_INVALID_HANDLE_TYPE]: This handle type cannot be sent

Pseudo-code:

httpsServer.on('request', (request, response) => {
  let socket = request.connection;
  myChildProcess.send({}, socket);
})

This works fine using "http" module. The error happens only when using "https".

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions