async-listener
async-listener copied to clipboard
net.Socket 'connect' event is not wrapped
Here's a failing test on my fork. I'm not sure this is something that can be wrapped without potentially wrapping the whole (Socket) emitter with something like events-intercept.
Tested fails on node v0.10.26 & v0.8.8
cc @sh1mmer @Raynos
This is probably a job for emitter-listener
(or it could be events-intercept
, if that's significantly simpler). The tricky part is that the performance hit if you wrap every socket would be pretty severe. I'll need to come up with a way to do this in a much more lightweight way.
Thanks for the report! If you get inspired to try to hack around this, let me know, even if the code is incomplete or gross.