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

raw-file: clear POLLOUT before handling

This commit is contained in:
Andy Green 2021-10-24 06:21:51 +01:00
parent b43f90a8ed
commit 1a69afaf6e

View file

@ -31,11 +31,11 @@ rops_handle_POLLIN_raw_file(struct lws_context_per_thread *pt, struct lws *wsi,
int n;
if (pollfd->revents & LWS_POLLOUT) {
n = lws_callback_as_writeable(wsi);
if (lws_change_pollfd(wsi, LWS_POLLOUT, 0)) {
lwsl_wsi_info(wsi, "failed at set pollfd");
return LWS_HPI_RET_WSI_ALREADY_DIED;
}
n = lws_callback_as_writeable(wsi);
if (n)
return LWS_HPI_RET_PLEASE_CLOSE_ME;
}