]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - udp_recv.c
Merge branch 't/udp_robustness'
[paraslash.git] / udp_recv.c
index 8dc8edc0a3c9588492a47a5d6389236c601dbdbd..00ad3e2781745c2e04af80dc462b75171e380dd0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2009 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2010 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -84,6 +84,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)