Skip to content

Commit 806b2be

Browse files
committed
client's test duration cannot be 0 when server sets max duration
1 parent 8c6be9f commit 806b2be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/iperf_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2247,7 +2247,7 @@ iperf_exchange_parameters(struct iperf_test *test)
22472247
if (get_parameters(test) < 0)
22482248
return -1;
22492249

2250-
if (test->max_server_duration > 0 && (test->duration + test->omit) > test->max_server_duration) {
2250+
if (test->max_server_duration > 0 && ((test->duration + test->omit) > test->max_server_duration) || test->duration == 0) {
22512251
if (iperf_set_send_state(test, SERVER_ERROR) != 0)
22522252
return -1;
22532253

0 commit comments

Comments
 (0)