From 11249054b326b67fab5795bd6d16dcc1c234ae76 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(+) diff --git a/tests/tcpflood.c b/tests/tcpflood.c index 8fd347f1..4a3199c8 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