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

net.connect issue with Node.js 7.10.0 #117

Open watson opened 7 years ago

watson commented 7 years ago

A commit recently landed in Node core that was released as v7.10.0 two days ago.

It breaks async-listener and therefore also continuation-local-storage because net.connect no longer calls Socket.prototype.connect. Furthermore, it's not possible to simply monkey-patch net.connect in async-listener because it's being called internally in node by simply referencing the connect function and not the exports.connect function.

I'm working on fixing this together with @cjihrig and @jasnell. See https://github.com/nodejs/node/pull/12852 for details.

It will most likely be released as v7.10.1.

Here's the relevant issue in async-listener: https://github.com/othiym23/async-listener/issues/109

watson commented 7 years ago

The work to fix this have now been moved to https://github.com/nodejs/node/pull/12861

othiym23 commented 6 years ago

This seems to still be busted as of Node 9 -- is there something we need to do to address this in either async-listener or CLS?

sabakugaara commented 6 years ago

test/net-events.tap.js failed, in node8+

this may work: https://github.com/othiym23/async-listener/pull/129, @watson @othiym23, I need some help, thanks!