othiym23 / node-continuation-local-storage

implementation of https://github.com/joyent/node/issues/5243
BSD 2-Clause "Simplified" License
1.13k stars 207 forks source link

node 0.12 and 4+ differences #122

Open jstrimpel opened 7 years ago

jstrimpel commented 7 years ago

Did something fundamentally change in the way callbacks are processed in Node 4+ that would cause the need for one to bind (ns.bind(callback)) all callbacks that occur inside an ns.run in order to not lose the run context?

jstrimpel commented 7 years ago

Removing the following line seems to resolve the issue or at least demonstrates the expected behavior within my application. Why? https://github.com/othiym23/node-continuation-local-storage/blob/master/context.js#L178