};
while (iov->iov_len > 0) {
- if (wait)
- wait_data(fd, false);
-
if (recv_fd) {
msghdr.msg_control = &fd_buf;
msghdr.msg_controllen = sizeof(fd_buf);
iov->iov_len -= bytes;
iov->iov_base += bytes;
total += bytes;
+
+ if (iov->iov_len > 0)
+ wait_data(fd, false);
}
return total;