joyent/node — pull request #4877 by bnoordhuis (2013-02-28 22:38:04+00:00)
Title: net: omit superfluous 'connect' event

Don't emit a 'connect' event on sockets that are handed off to
net.Server 'connection' event listeners.

1. It's superfluous because the connection has already been established
at that point.

2. The implementation is arguably wrong because the event is emitted on
the same tick of the event loop while the rule of thumb is to always
emit it on the next one.

This has been tried before in commit f0a440d but was reverted again in
ede1acc because the change was incomplete (at least one test hadn't
been updated).

Fixes #1047 (again).

An oldie but a goodie. Suggested reviewers: @isaacs @TooTallNate