X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fio%2Fpoll.c;h=3354abe01a2bae38ae6728b9f9f07522053b90b2;hb=7082f7d0e81911acb26787949c251dfb298cbdd8;hp=a4e83ed761e77251767b01b3e3f5c5dd3492bfcd;hpb=261b10869ddbb4ac650ef8886c5052b1a8dbeecd;p=ccan diff --git a/ccan/io/poll.c b/ccan/io/poll.c index a4e83ed7..3354abe0 100644 --- a/ccan/io/poll.c +++ b/ccan/io/poll.c @@ -130,9 +130,11 @@ void backend_new_plan(struct io_conn *conn) num_waiting--; pfd->events = 0; - if (conn->plan[IO_IN].status == IO_POLLING) + if (conn->plan[IO_IN].status == IO_POLLING_NOTSTARTED + || conn->plan[IO_IN].status == IO_POLLING_STARTED) pfd->events |= POLLIN; - if (conn->plan[IO_OUT].status == IO_POLLING) + if (conn->plan[IO_OUT].status == IO_POLLING_NOTSTARTED + || conn->plan[IO_OUT].status == IO_POLLING_STARTED) pfd->events |= POLLOUT; if (pfd->events) {