]> git.ozlabs.org Git - ccan/blobdiff - ccan/io/poll.c
ccan/io: handle errors on poll()
[ccan] / ccan / io / poll.c
index 06e3b59104d0f4e4d9d010e86109f31d59af7c04..42ed67ad278a0c870c9c4a98baa015eb0ed4e60a 100644 (file)
@@ -338,7 +338,7 @@ void *io_loop(void)
                                /* debug can recurse; anything can change. */
                                if (doing_debug())
                                        break;
-                       } else if (events & POLLHUP) {
+                       } else if (events & (POLLHUP|POLLNVAL|POLLERR)) {
                                r--;
                                set_current(c);
                                set_plan(c, io_close());