cluster: fix error on worker disconnect/destroy by santigimeno · Pull Request #32793 · nodejs/node

@santigimeno

Avoid sending multiple `exitedAfterDisconnect` messages when
concurrently calling `disconnect()` and/or `destroy()` from the worker
so `ERR_IPC_DISCONNECTED` errors are not generated.

Fixes: nodejs#32106

@nodejs-github-bot added the cluster

Issues and PRs related to the cluster subsystem.

label

Apr 12, 2020

himself65

himself65

addaleax

@addaleax addaleax added the author ready

PRs that have at least one approval, no pending requests for changes, and a CI started.

label

Apr 27, 2020

addaleax pushed a commit that referenced this pull request

Apr 28, 2020
Avoid sending multiple `exitedAfterDisconnect` messages when
concurrently calling `disconnect()` and/or `destroy()` from the worker
so `ERR_IPC_DISCONNECTED` errors are not generated.

Fixes: #32106

PR-URL: #32793
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>

targos pushed a commit that referenced this pull request

May 4, 2020
Avoid sending multiple `exitedAfterDisconnect` messages when
concurrently calling `disconnect()` and/or `destroy()` from the worker
so `ERR_IPC_DISCONNECTED` errors are not generated.

Fixes: #32106

PR-URL: #32793
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>

targos pushed a commit that referenced this pull request

May 7, 2020
Avoid sending multiple `exitedAfterDisconnect` messages when
concurrently calling `disconnect()` and/or `destroy()` from the worker
so `ERR_IPC_DISCONNECTED` errors are not generated.

Fixes: #32106

PR-URL: #32793
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>

targos pushed a commit that referenced this pull request

May 13, 2020
Avoid sending multiple `exitedAfterDisconnect` messages when
concurrently calling `disconnect()` and/or `destroy()` from the worker
so `ERR_IPC_DISCONNECTED` errors are not generated.

Fixes: #32106

PR-URL: #32793
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>