|
|
|
@ -59,7 +59,7 @@ connectorAccept(void * _this, TR_Event event) |
|
|
|
TR_TcpSocket socket = TR_socketAccept( |
|
|
|
(TR_TcpSocket)connection->transport); |
|
|
|
|
|
|
|
while (socket && count++ < 100) { |
|
|
|
while (socket) { |
|
|
|
TR_socketNonblock((TR_Socket)socket); |
|
|
|
TR_Connection new_con = TR_new( |
|
|
|
TR_Connection, |
|
|
|
@ -72,22 +72,10 @@ connectorAccept(void * _this, TR_Event event) |
|
|
|
(TR_EventSubject)new_con, |
|
|
|
TR_CON_EVENT_NEW_CON, |
|
|
|
NULL)); |
|
|
|
if (++count > 100) break; |
|
|
|
socket = TR_socketAccept((TR_TcpSocket)connection->transport); |
|
|
|
} |
|
|
|
|
|
|
|
/* |
|
|
|
* reenable socket for poll |
|
|
|
*/ |
|
|
|
TR_eventHandlerIssueEvent( |
|
|
|
(TR_EventHandler)_this, |
|
|
|
TR_eventSubjectEmit( |
|
|
|
(TR_EventSubject)connection, |
|
|
|
TR_CEP_EVENT_READ_BLOCK, |
|
|
|
NULL)); |
|
|
|
/** |
|
|
|
* TODO we need to identify socket failures and close socket then. |
|
|
|
*/ |
|
|
|
|
|
|
|
return TR_EVENT_DONE; |
|
|
|
} |
|
|
|
|
|
|
|
|