X-Git-Url: http://git.meshlink.io/?p=meshlink;a=blobdiff_plain;f=src%2Fmeshlink.c;h=7c5bbd22741476532e0d17cdfbe992a7e2056276;hp=1118b8a5e6b31b5d24cda596b66117099fea661a;hb=64db0bb3f32236b55746bf62002faca08a54e364;hpb=26fdd4fc9d2a2cc12b0118c3061a65ab3f3ee6c4 diff --git a/src/meshlink.c b/src/meshlink.c index 1118b8a5..7c5bbd22 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -3538,6 +3538,10 @@ static ssize_t channel_recv(struct utcp_connection *connection, const void *data ssize_t result = write(aio->fd, p, todo); if(result <= 0) { + if(result < 0 && errno == EINTR) { + continue; + } + /* Writing to fd failed, cancel just this AIO buffer. */ logger(mesh, MESHLINK_ERROR, "Writing to AIO fd %d failed: %s", aio->fd, strerror(errno)); @@ -3678,6 +3682,10 @@ static void channel_poll(struct utcp_connection *connection, size_t len) { todo = result; sent = utcp_send(connection, buf, todo); } else { + if(result < 0 && errno == EINTR) { + continue; + } + /* Reading from fd failed, cancel just this AIO buffer. */ if(result != 0) { logger(mesh, MESHLINK_ERROR, "Reading from AIO fd %d failed: %s", aio->fd, strerror(errno));