From 1bc864bfcdd7e57d3c049a1f5a8cd66c59c08b7a Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 14 Jan 2013 08:30:42 +0100 Subject: tcpflood: properly terminate when sending small files --- tests/tcpflood.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/tcpflood.c') diff --git a/tests/tcpflood.c b/tests/tcpflood.c index c3e5b57e..db65b7de 100644 --- a/tests/tcpflood.c +++ b/tests/tcpflood.c @@ -429,6 +429,8 @@ int sendMessages(struct instdata *inst) } } genMsg(buf, sizeof(buf), &lenBuf, inst); /* generate the message to send according to params */ + if(lenBuf == 0) + break; /* terminate when no message could be generated */ if(transport == TP_TCP) { if(sockArray[socknum] == -1) { /* connection was dropped, need to re-establish */ -- cgit v1.2.3