Skip to content

Commit

Permalink
Add error message in case of UDP send NET_SOFTERROR
Browse files Browse the repository at this point in the history
  • Loading branch information
davidBar-On committed Aug 19, 2022
1 parent f981362 commit ec1be7d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/iperf_udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,11 @@ iperf_udp_send(struct iperf_stream *sp)

r = Nwrite(sp->socket, sp->buffer, size, Pudp);

if (r < 0)
return r;
if (r < 0) {
if (r == NET_SOFTERROR && sp->test->debug_level >= DEBUG_LEVEL_INFO)
printf("UDP send failed on NET_SOFTERROR. errno=%s\n", strerror(errno));
return r;
}

sp->result->bytes_sent += r;
sp->result->bytes_sent_this_interval += r;
Expand Down

0 comments on commit ec1be7d

Please sign in to comment.