Commit 306b6b0e authored by Rusty Russell's avatar Rusty Russell

ccan/io: handle errors on poll()

Without this, closing an fd results in a spin...
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 3a7b8a8a
......@@ -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());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment