Skip to content

Commit

Permalink
Do NOT receive multiple blocks when -n, -k or --file are set
Browse files Browse the repository at this point in the history
  • Loading branch information
davidBar-On committed Apr 30, 2024
1 parent fc5e1eb commit a5b1902
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/iperf_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -4412,9 +4412,11 @@ iperf_new_stream(struct iperf_test *test, int s, int sender)
return NULL;
}

/* Set stream block size;TCP receives messages in multiple of burst size */
/* Set stream block size; TCP receives messages in multiple of burst size */
sp->blksize = sp->settings->blksize;
if (test->protocol->id == Ptcp && !sender) {
if (test->protocol->id == Ptcp && !sender &&
sp->settings->bytes == 0 && sp->settings->blocks == 0 && sp->test->diskfile_name == (char*) 0)
{
multisend = iperf_calc_burst_size(test);
i = MAX_BLOCKSIZE / sp->blksize;
if (multisend > i)
Expand Down

0 comments on commit a5b1902

Please sign in to comment.