JoshGlazebrook / socks

Fully featured SOCKS proxy client supporting SOCKSv4, SOCKSv4a, and SOCKSv5. Includes Bind and Associate functionality.
https://www.npmjs.com/package/socks
MIT License
304 stars 35 forks source link

Fix completely inexplicable EventEmitter problem on net.socket #21

Closed acofer closed 7 years ago

acofer commented 7 years ago

This stopped working for us when we upgraded to node 8.8.1 from 6. I have no idea why socket.once('data', handshake) doesn't run handshake, but socket.on('data', handshake) does, so... 🤷‍♂️ ?

JoshGlazebrook commented 7 years ago

I'm not actually able to recreate this issue, using the same 8.8.1 node version.

JoshGlazebrook commented 7 years ago

@acofer Also, I will be starting on v2 later this month. If you have any requests: https://github.com/JoshGlazebrook/socks/issues/18

acofer commented 7 years ago

Sorry... it turned out to be the module 'wtfnode' we were using to inspect/list open sockets that were keeping the new version of mocha from closing. It, of course, attaches more event listeners to socket.on('data'), which messed up handshake.

Thanks for taking a look, though! We'll look forward to version 2. Good luck!