Skip to content

Commit

Permalink
Fixes #970
Browse files Browse the repository at this point in the history
  • Loading branch information
petkaantonov committed Jan 23, 2016
1 parent 612ad75 commit c66c2ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/timers.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use strict";
module.exports = function(Promise, INTERNAL) {
module.exports = function(Promise, INTERNAL, debug) {
var util = require("./util");
var TimeoutError = Promise.TimeoutError;

Expand All @@ -19,7 +19,9 @@ var afterTimeout = function (promise, message, parent) {
util.markAsOriginatingFromRejection(err);
promise._attachExtraTrace(err);
promise._reject(err);
parent.cancel();
if (debug.cancellation()) {
parent.cancel();
}
};

var afterValue = function(value) { return delay(+this).thenReturn(value); };
Expand Down
2 changes: 1 addition & 1 deletion tools/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function writeCoverageFile(coverage, groupNumber) {
}

function needsFreshProcess(testName) {
return /domain|multiple-copies|unhandled_rejections/.test(testName) ||
return /domain|multiple-copies|unhandled_rejections|nodeify/.test(testName) ||
testUtils.isOldNode && /api_exceptions|promisify/.test(testName);
}

Expand Down

0 comments on commit c66c2ca

Please sign in to comment.