Closed holmok closed 5 years ago
I tested this out and can confirm. It seems to be due to multipleResolves
. Going to continue and take a closer look.
The promise that is resolving twice is the Promise.race()
found here. Related to a potential V8 quirk mentioned in this issue https://github.com/nodejs/node/issues/24321.
Catbox is intentionally using multiple resolves (which has apparently been declared unsafe). I'm not sure what to do here.
This is all rather quite silly. Now, if I want to make a deferred, where I intend to support multiple resolves / rejects, I need to keep track of the state of the promise (replicating the internal state).
I believe this is resolved (😉) in make-promises-safe v4.
👍 thanks.
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
When using
require('make-promises-safe')
the default memory caching kills the application. Here is some sample code...This code works fine with
// require('make-promises-safe')
commented out, but as soon as you uncomment it and call toconst now = await request.server.methods.date()
in a handler the process ends and outputs this to the console.resolve Promise { '2018-11-18T16:50:31.617Z' } undefined