mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
fix: iperf can not exit when stop
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
parent
f1d5d6e671
commit
5e22b6f564
1 changed files with 2 additions and 0 deletions
|
|
@ -388,6 +388,7 @@ static int iperf_run_tcp_server(void)
|
|||
iperf_start_report();
|
||||
|
||||
t.tv_sec = IPERF_SOCKET_RX_TIMEOUT;
|
||||
t.tv_usec = 0;
|
||||
setsockopt(sockfd, SOL_SOCKET, SO_RCVTIMEO, &t, sizeof(t));
|
||||
}
|
||||
|
||||
|
|
@ -476,6 +477,7 @@ static int iperf_run_udp_server(void)
|
|||
printf("want recv=%d", want_recv);
|
||||
|
||||
t.tv_sec = IPERF_SOCKET_RX_TIMEOUT;
|
||||
t.tv_usec = 0;
|
||||
setsockopt(sockfd, SOL_SOCKET, SO_RCVTIMEO, &t, sizeof(t));
|
||||
|
||||
while (!s_iperf_ctrl.finish)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue