Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/iperf_client_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ iperf_client_worker_run(void *s) {
return NULL;

cleanup_and_fail:
if (test->ctrl_sck != -1) { // Make sure test was not cleared yet by the main thread
// Error message is printed to NULL test to prevent adding JSON output context into the thread context
iperf_err(NULL, "Server Worker Thread failed - %s", iperf_strerror(i_errno));
if (test->ctrl_sck != -1) iflush(test);
}
return NULL;
}

Expand Down
5 changes: 5 additions & 0 deletions src/iperf_server_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ iperf_server_worker_run(void *s) {
return NULL;

cleanup_and_fail:
if (test->ctrl_sck != -1) { // Make sure test was not cleared yet by the main thread
// Error message is printed to NULL test to prevent adding JSON output context into the thread context
iperf_err(NULL, "Server Worker Thread failed - %s", iperf_strerror(i_errno));
if (test->ctrl_sck != -1) iflush(test);
}
return NULL;
}

Expand Down
Loading