Commit c1161202 authored by Ben Noordhuis's avatar Ben Noordhuis
Browse files

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 f0a440d8 but was reverted again in
ede1acc1 because the change was incomplete (at least one test hadn't
been updated).

Fixes #1047 (again).
parent bb431531
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment