remove read from sendfile code path

This commit is contained in:
quackerd 2023-03-14 09:32:55 +01:00
parent af31620e87
commit 771f275ca0

View File

@ -4657,6 +4657,10 @@ diskfile_send(struct iperf_stream *sp)
}
r = read(sp->diskfile_fd, sp->buffer, sp->test->settings->blksize -
sp->diskfile_left);
if (r <= 0) {
iperf_err(sp->test, "read failed again %d errno %d\n", r, errno);
return -1;
}
}
if (r < 0) {
iperf_err(sp->test, "read failed with %d\n", errno);