Skip to content
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
@vkurchatkin

Description

@vkurchatkin

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');
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions