1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

raw file: drain POLLIN before handling close as needed for pipes

This commit is contained in:
Andy Green 2020-02-13 18:16:51 +00:00
parent 3d8fbdd3ac
commit e9fd43e041

View file

@ -50,7 +50,8 @@ rops_handle_POLLIN_raw_file(struct lws_context_per_thread *pt, struct lws *wsi,
}
if (pollfd->revents & LWS_POLLHUP)
return LWS_HPI_RET_PLEASE_CLOSE_ME;
if (!(pollfd->revents & LWS_POLLIN))
return LWS_HPI_RET_PLEASE_CLOSE_ME;
return LWS_HPI_RET_HANDLED;
}