-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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: don't send messages if no IPC channel #7132
cluster: don't send messages if no IPC channel #7132
Conversation
LGTM |
message.seq = seq; | ||
seq += 1; | ||
return proc.send(message, handle); | ||
if (proc.connected) { |
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.
The diff would be a little less noisy if you did:
if (!proc.connected)
return false;
LGTM, I just hope there aren't scenarios I'm not thinking of where this could swallow valid errors. |
f54ce27
to
6e838e9
Compare
Updated. Thanks! |
381d514
to
de6ff56
Compare
Rebased to current master. One last CI run: https://ci.nodejs.org/job/node-test-pull-request/2957/ |
All is green. Landing |
Avoid sending messages if the IPC channel is already disconnected. It avoids undesired errors when calling `process.disconnect` when there are still pending IPC messages. PR-URL: nodejs#7132 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
de6ff56
to
8c53d2f
Compare
Landed in 8c53d2f. Thanks! |
Avoid sending messages if the IPC channel is already disconnected. It avoids undesired errors when calling `process.disconnect` when there are still pending IPC messages. PR-URL: #7132 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@santigimeno lts? |
@thealphanerd Yes, I would think so. |
Avoid sending messages if the IPC channel is already disconnected. It avoids undesired errors when calling `process.disconnect` when there are still pending IPC messages. PR-URL: #7132 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Avoid sending messages if the IPC channel is already disconnected. It avoids undesired errors when calling `process.disconnect` when there are still pending IPC messages. PR-URL: #7132 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Avoid sending messages if the IPC channel is already disconnected. It avoids undesired errors when calling `process.disconnect` when there are still pending IPC messages. PR-URL: #7132 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Avoid sending messages if the IPC channel is already disconnected. It avoids undesired errors when calling `process.disconnect` when there are still pending IPC messages. PR-URL: #7132 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Checklist
Affected core subsystem(s)
cluster
Description of change
Avoid sending messages if the IPC channel is already disconnected.
It avoids undesired errors when calling
process.disconnect
when thereare still pending IPC messages.
/cc @cjihrig @bnoordhuis