-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Including appmetrics breaks promisified setTimeout #634
Comments
Same here for Node v13.0.1. But it's the async-listener package that's causing this since it's overriding the core Promise class with a custom one WrappedPromise.
this is the dependency package list for which package requires what ending at the async-listener package. But as a work around you can try using const wait = ms => new Promise(_ => setTimeout(_, ms)); instead of the promisify package on setTimeout |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
node v12.10.0, appmetrics v5.1.1
Test case:
Result without appmetrcis:
Result with appmetrics:
It seems as if for some reason
promisify
would not respectsetTimeout
's customutil.promisify.custom
handler in this case!EDIT: After further testing, it seems that after including
appmetrics/start
, for some reasonsetTimeout
andsetImmediate
are now missing theutil.promisify.custom
symbol property entirely! Also, confusingly, this does not happen when I do it from a node REPL.The text was updated successfully, but these errors were encountered: