Commit 5d14a6ec authored by Julien Gilli's avatar Julien Gilli Committed by Jeremiah Senkpiel
Browse files

timers: don't mutate unref list while iterating it

Commit 934bfe23 had introduced a
regression where node would crash trying to access a null unref timer if
a given unref timer's callback would remove other unref timers set to
fire in the future.

More generally, it makes the unrefTimeout function more solid by not
mutating the unrefList while traversing it.

Fixes: https://github.com/joyent/node/issues/8897

Conflicts:
	lib/timers.js

Fixes: https://github.com/nodejs/node-convergence-archive/issues/23
Ref: https://github.com/nodejs/node/issues/268
PR-URL: https://github.com/nodejs/node/pull/2540


Reviewed-By: default avatarbnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
parent 6e744c58
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