diff --git a/src/connector.c b/src/connector.c index ec6b95e..9196ae8 100644 --- a/src/connector.c +++ b/src/connector.c @@ -53,12 +53,13 @@ static TR_EventDone connectorAccept(void * _this, TR_Event event) { + int count = 0; TR_Connector this = _this; TR_CommEndPoint connection = (TR_CommEndPoint)event->subject; TR_TcpSocket socket = TR_socketAccept( (TR_TcpSocket)connection->transport); - while (socket) { + while (socket && count++ < 100) { TR_socketNonblock((TR_Socket)socket); TR_Connection new_con = TR_new( TR_Connection, diff --git a/testers/testclient.sh b/testers/testclient.sh index be3e8d9..50aac64 100755 --- a/testers/testclient.sh +++ b/testers/testclient.sh @@ -2,7 +2,7 @@ pids="" i=0 -while [ $i -lt 120 ] +while [ $i -lt 800 ] do dd if=/dev/zero bs=8192 count=2500 | nc 192.168.2.13 5678 & pids="${pids} $!"