Commit d46d9f1d authored by Ben Noordhuis's avatar Ben Noordhuis Committed by James M Snell
Browse files

cluster: remove handles when disconnecting worker

Due to the race window between the master's "disconnect" message and the
worker's "handle received" message, connections sometimes got stuck in
the pending handles queue when calling `worker.disconnect()` in the
master process.

The observable effect from the client's perspective was a TCP or HTTP
connection that simply stalled.  This commit fixes that by closing open
handles in the master when the "disconnect" message is sent.

Fixes: https://github.com/nodejs/node/issues/3551
PR-URL: https://github.com/nodejs/node/pull/3677


Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarFedor Indutny <fedor@indutny.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 02ea6f41
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