Closed AlexDenisov closed 7 years ago
This is behaving as intended. monk already provides a promise based interface, so you could just do Promise.resolve(monk('mongodb://localhost:27017/monk'))
to get a promise using this implementation, or monk('mongodb://localhost:27017/monk')
if you're happy with node.js's built in promise implementation.
There is a bug in monk here because it does not check for the cases where the connection is already open or has already failed to open. If that bug was fixed, it would then be working fine with promise.
Hi @ForbesLindesay,
This is behaving as intended.
Could you tell me more about this? For me, it looks a bit weird since the program just hangs.
Hi folks, I hope this is the right place to raise this concern.
On my project, I've found one nasty bug, which I didn't manage to fix myself. But, I was able to extract it into a small project.
Here is the code I have:
When I run it I see the
about to resolve
message, however, the followingthen
never called.So far I worked the issue around by using a wrapper object:
which works as expected.
How to reproduce
I hope this report helps to make this project better. Please, let me know if I need to provide more information.