If the client gets interrupted / signaled, dump JSON output.
Issue: 132 (signal handler for API calls)
This commit is contained in:
parent
ac0786c828
commit
a898ff8b8e
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2013, The Regents of the University of California,
|
* Copyright (c) 2009-2014, The Regents of the University of California,
|
||||||
* through Lawrence Berkeley National Laboratory (subject to receipt of any
|
* through Lawrence Berkeley National Laboratory (subject to receipt of any
|
||||||
* required approvals from the U.S. Dept. of Energy). All rights reserved.
|
* required approvals from the U.S. Dept. of Energy). All rights reserved.
|
||||||
*
|
*
|
||||||
@ -2322,6 +2322,9 @@ iperf_got_sigend(struct iperf_test *test)
|
|||||||
(void) Nwrite(test->ctrl_sck, (char*) &test->state, sizeof(signed char), Ptcp);
|
(void) Nwrite(test->ctrl_sck, (char*) &test->state, sizeof(signed char), Ptcp);
|
||||||
}
|
}
|
||||||
i_errno = (test->role == 'c') ? IECLIENTTERM : IESERVERTERM;
|
i_errno = (test->role == 'c') ? IECLIENTTERM : IESERVERTERM;
|
||||||
|
/* If the client, then dump JSON output if any */
|
||||||
|
if (test->role == 'c')
|
||||||
|
iperf_client_end(test);
|
||||||
iperf_errexit(test, "interrupt - %s", iperf_strerror(i_errno));
|
iperf_errexit(test, "interrupt - %s", iperf_strerror(i_errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user