X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fio%2Fpoll.c;h=1b11badd642c0d87d1270d642ac63db40f9cb24e;hp=0078fc658411c1d50e01a5c3e9eed278f5214a83;hb=dded32f2b03fca526271e35671fa36d299880429;hpb=83d4e1285dec87fa54043377eafd1b3bf9b0c53f diff --git a/ccan/io/poll.c b/ccan/io/poll.c index 0078fc65..1b11badd 100644 --- a/ccan/io/poll.c +++ b/ccan/io/poll.c @@ -346,7 +346,11 @@ void *do_io_loop(struct io_conn **ready) * anything can change. */ if (doing_debug()) break; - if (!(events&(POLLIN|POLLOUT))) + + /* If no events, or it closed + * the duplex, continue. */ + if (!(events&(POLLIN|POLLOUT)) + || !c->plan.next) continue; } }