Bugfix: Server-side clients not attached between creation and on_connect.
authorRyan <ry@tinyclouds.org>
Wed, 15 Jul 2009 15:00:15 +0000 (17:00 +0200)
committerRyan <ry@tinyclouds.org>
Wed, 15 Jul 2009 15:36:30 +0000 (17:36 +0200)
commit1b6bbc619dcaf5f97a2a18f29adf2e0146222640
treed802b513e495ab3883fdd1c1e545bd42c220602a
parentfc0222139338c54432c0cd2c1faca4c21d469cf7
Bugfix: Server-side clients not attached between creation and on_connect.

Solution is to manually add Attach() to OnConnection.

For client side it seems there is no Detach() being called after NS
resolution? Otherwise I would have removed it. That was another bug.

Note: We don't want to modify evnet's behavior to have on_connect called
directly when the socket is accepted. evnet needs to support SSL, and
on_connect is supposed to signal that the SSL connection is established. The
point here is that being "connected" and being "attached" to the event loop
are two different things. SSL stuff may be transmitted when a socket is not
"connected" but it must always be attached.
src/net.cc
src/net.h
test/mjsunit/test-tcp-many-clients.js [new file with mode: 0644]