]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - udp_recv.c
para_recv: handle EAGAIN on non-blocking socket
[paraslash.git] / udp_recv.c
index 4f363ccb7f15b65273867526dcd43e9a98337b9c..316957d51050fc6e2751bfd6a48f9d1034a9e285 100644 (file)
@@ -92,6 +92,9 @@ static void udp_recv_post_select(__a_unused struct sched *s, struct task *t)
        if (iovcnt == 0)
                goto err;
        ret = para_readv(purd->fd, iov, iovcnt);
+       /* EAGAIN is possible even if FD_ISSET */
+       if (ret < 0 && is_errno(-ret, EAGAIN))
+               return;
        if (ret == 0)
                ret = -E_RECV_EOF;
        if (ret < 0)