Block on sendmsg() for now

Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
This commit is contained in:
Adrien Gallouët
2019-09-09 16:08:21 +00:00
parent 6623be1e69
commit 2c9d971437

6
mud.c
View File

@@ -436,7 +436,11 @@ mud_send_path(struct mud *mud, struct mud_path *path, uint64_t now,
memcpy(CMSG_DATA(cmsg), &tc, sizeof(int));
}
ssize_t ret = sendmsg(mud->fd, &msg, flags);
ssize_t ret = 0;
do {
ret = sendmsg(mud->fd, &msg, flags);
} while (ret == (ssize_t)-1 && errno == EAGAIN);
path->send.total++;
path->send.bytes += size;