This repository was archived by the owner on Apr 22, 2023. It is now read-only.
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
promises prevent domain propagation #8648
Closed
Description
Test case:
var domain = require('domain').create();
function asyncStuff(cb) {
new Promise(function(resolve) {
setImmediate(resolve);
}).then(cb);
}
domain.run(function() {
asyncStuff(function() {
setImmediate(function() {
throw new Error;
});
});
});
domain.on('error', function() {
console.log('caught');
});