aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndy Green <andy@warmcat.com>2021-10-24 06:21:51 +0100
committerAndy Green <andy@warmcat.com>2021-10-24 16:57:40 +0100
commit1a69afaf6ec8c78ee6537293336b962e0cd4d695 (patch)
tree0bab30e2937e204caa946deca17560e557e52385 /lib
parentb43f90a8ed4da95c6cf5c4550e3dffca6018b85e (diff)
downloadlibwebsockets-1a69afaf6ec8c78ee6537293336b962e0cd4d695.tar.gz
raw-file: clear POLLOUT before handling
Diffstat (limited to 'lib')
-rw-r--r--lib/roles/raw-file/ops-raw-file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/roles/raw-file/ops-raw-file.c b/lib/roles/raw-file/ops-raw-file.c
index 37e21256..0f753272 100644
--- a/lib/roles/raw-file/ops-raw-file.c
+++ b/lib/roles/raw-file/ops-raw-file.c
@@ -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;
}