diff --git a/tools/libxl/libxl_aoutils.c b/tools/libxl/libxl_aoutils.c index a5a10fbf3e..0d4c8af345 100644 --- a/tools/libxl/libxl_aoutils.c +++ b/tools/libxl/libxl_aoutils.c @@ -205,6 +205,9 @@ static void datacopier_readable(libxl__egc *egc, libxl__ev_fd *ev, libxl__datacopier_state *dc = CONTAINER_OF(ev, *dc, toread); STATE_AO_GC(dc->ao); + if ((revents & (POLLHUP|POLLIN)) == (POLLHUP|POLLIN)) + revents &= ~POLLHUP; + if (datacopier_pollhup_handled(egc, dc, revents, 0)) return;