A late follow-up.

Ignore resource leak issue warning in the previous message. Function namespace.bindEmitter() has nothing to do with cleaning up the context. The context clean up depends on destroy listener from Async Hooks API.

Still, for web frameworks, like Express, it’s recommended to use it to make sure that your middleware execution plays nice with CLS.



Distributed systems gazer. Node.js contributor. Occasional tech blogger and speaker.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store