Closed
Description
- Version: 11.1.0 and master. 10.x is not impacted
- Platform: macOS
- Subsystem: timers
The following code should exit once the 110ms timer fires. Unfortunately, that never happens. Note, I tried including #24318, and that did not fix the issue either.
'use strict';
let client = null;
function serverBeat() {
setTimeout(() => {}, 45);
setTimeout(serverBeat, 50);
clientBeat();
}
function clientBeat() {
clearTimeout(client);
client = setTimeout(clientBeat, 95);
}
setTimeout(() => {}, 10000);
setTimeout(serverBeat, 50);
setTimeout(() => {}, 120000);
clientBeat();
setTimeout(() => {
console.log('finished!');
process.exit();
}, 110);
Refs: hapijs/nes#257
cc: @nodejs/timers