Im using a promise for a child process that does not have it's own timeout. I've tried Promise Bluebird's race
method, it is throwing but still hanging the console.
const done = () => Promise.delay(500).then(() => throw new Error('timeout')
const fire = () => Promise.race([promiseHangs(url), done()])
fire().then(console.log)
How can I resolve the promiseHangs
promise and stop the async process from running?