Skip to content

child_process: fix IPC 'message' event regression

Rodrigo Muino Tomonari requested to merge github/fork/cjihrig/ipc into master

This PR reverts 8208fdae from #13459. When IPC messages are not emitted in the next tick, a 'message' handler that throws can break the IPC read loop. This was originally fixed in #6909.

The second commit in this PR adds a regression test that fails with 8208fdae, but passes with the revert (at least on my machine).

Note: I believe this can be fixed without a full revert of 8208fdae, but wanted to use that as a starting point for this PR.

Refs: https://github.com/nodejs/node/pull/6909 Refs: https://github.com/nodejs/node/pull/13459 Refs: https://github.com/nodejs/node/pull/13648

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

child_process, test

Merge request reports

Loading