Commit 397eceb6 authored by Gireesh Punathil's avatar Gireesh Punathil
Browse files

test: fix worker send error

In test-child-process-fork-closed-channel-segfault.js, race condition
is observed between the server getting closed and the worker sending
a message. Accommodate the potential errors.

Earlier, the same race was observed between the client and server
and was addressed through ignoring the relevant errors through error
handler. The same mechanism is re-used for worker too.

The only difference is that the filter is applied at the callback
instead of at the worker's error listener.

Refs: https://github.com/nodejs/node/issues/3635#issuecomment-157714683
Fixes: https://github.com/nodejs/node/issues/20836
PR-URL: https://github.com/nodejs/node/pull/20973



Reviewed-By: default avatarRich Trott <rtrott@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarJon Moss <me@jonathanmoss.me>
Reviewed-By: default avatarMatheus Marchini <matheus@sthima.com>
Reviewed-By: default avatarJoyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: default avatarBartosz Sosnowski <bartosz@janeasystems.com>
parent 1dae5263
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment