timers: fix processing of nested timers
Whenever a timer is scheduled within another timer, there are a few known issues that we are fixing: * Whenever the timer being scheduled has the same timeout value as the outer timer, the newly created timer can fire on the same tick of the event loop instead of during the next tick of the event loop * Whenever a timer is added in another timer's callback, its underlying timer handle will be started with a timeout that is actually incorrect This commit consists of https://github.com/nodejs/node-v0.x-archive/pull/17203 and https://github.com/nodejs/node-v0.x-archive/pull/25763. Fixes: https://github.com/nodejs/node-v0.x-archive/issues/9333 Fixes: https://github.com/nodejs/node-v0.x-archive/issues/15447 Fixes: https://github.com/nodejs/node-v0.x-archive/issues/25607 Fixes: https://github.com/nodejs/node/issues/5426 PR-URL: https://github.com/nodejs/node/pull/3063
parent
2fe277a0
Please register or sign in to comment