Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

cluster: avoid race enabling debugger in worker #9037

Closed
wants to merge 2 commits into from

Conversation

tjfontaine
Copy link

Previously if a worker's state machine had already transitioned into the
'listening' state when it received the message enabling the debugger,
the worker would never enable its debugger.

Change the logic to allow the 'listening' as a valid state for enabling
the debugger.

Fixes #6440

Also improve the test that covers this mechanism.

Previously if a worker's state machine had already transitioned into the
'listening' state when it received the message enabling the debugger,
the worker would never enable its debugger.

Change the logic to allow the 'listening' as a valid state for enabling
the debugger.

Fixes nodejs#6440
unref one superfluous timer (as the test suite already has a global
timeout), and improve the state machine to iterate the messages more
reliably.

Ultimately make the test complete more quickly.
@misterdjules
Copy link

@tjfontaine Thank you, landed in e9df9a0 and 58fcc65!

bnoordhuis pushed a commit to bnoordhuis/io.js that referenced this pull request Jan 19, 2015
Previously if a worker's state machine had already transitioned into the
'listening' state when it received the message enabling the debugger,
the worker would never enable its debugger.

Change the logic to allow the 'listening' as a valid state for enabling
the debugger.

Fixes: nodejs/node-v0.x-archive#6440
Original-PR-URL: nodejs/node-v0.x-archive#9037
Signed-off-by: Julien Gilli <julien.gilli@joyent.com>

Fixes: nodejs#340
PR-URL: nodejs#501
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants