diff --git a/src/iperf_client_api.c b/src/iperf_client_api.c index 7c22caded..6d8eee2dd 100644 --- a/src/iperf_client_api.c +++ b/src/iperf_client_api.c @@ -807,6 +807,9 @@ iperf_run_client(struct iperf_test * test) /* Cancel all outstanding threads */ i_errno_save = i_errno; SLIST_FOREACH(sp, &test->streams, streams) { + if (sp->done) { + continue; + } sp->done = 1; int rc; rc = pthread_cancel(sp->thr);