You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
It seems that Q doesn't detect circular promise chains and in some situations, it can go to an infinite loop that never terminates. I encountered the following piece of code:
var Promise = require('q');
var p1 = new Promise(function (resolve, reject) {
resolve(19)
});
var p2 = p1.then(function (v) {
return p2;
});
var p3 = p2.then(function (v) {
return v
})
First callback to then returns the promise (p2) that is actually returned by then itself, which causes a chaining cycle for p2. This test never terminates. Maybe you would like to check this out.
The text was updated successfully, but these errors were encountered:
Hello,
It seems that Q doesn't detect circular promise chains and in some situations, it can go to an infinite loop that never terminates. I encountered the following piece of code:
First callback to then returns the promise (p2) that is actually returned by then itself, which causes a chaining cycle for p2. This test never terminates. Maybe you would like to check this out.
The text was updated successfully, but these errors were encountered: