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
What version of bluebird is the issue happening on?
"bluebird": "^3.7.2",
"@types/bluebird": "^3.5.33",
What platform and version?
Using ts-node version 8.10.2, typescript version 3.9.5
node v12.18.4
Did this issue happen with earlier version of bluebird?
No idea.
Reproduce
importP= require('bluebird');P.config({cancellation: true,});asyncfunctiongo(){setTimeout(()=>{},5000);// keep aliveconsole.log('start');constp=newP((resolve: any,reject: any,onCancel: any)=>{constto=setTimeout(()=>resolve(),2000);onCancel(()=>{console.log('onCancel called');clearTimeout(to);reject(newError('cancel'));// no error throwed. With resolve() in this place it also hangs on await});});setTimeout(()=>p.cancel(),1000);awaitp;console.log('end');}go();
Actual output:
start
onCancel called
Expected output:
start
onCancel called
end
The text was updated successfully, but these errors were encountered:
@bergus it is not working neither with resolve nor with reject - it just hangs on await in both cases.
(btw. reject without try/catch should throw and here nothing happens)
What version of bluebird is the issue happening on?
"bluebird": "^3.7.2",
"@types/bluebird": "^3.5.33",
What platform and version?
Using ts-node version 8.10.2, typescript version 3.9.5
node v12.18.4
Did this issue happen with earlier version of bluebird?
No idea.
Reproduce
Actual output:
Expected output:
The text was updated successfully, but these errors were encountered: