aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Green <andy@warmcat.com>2021-10-16 05:28:37 +0100
committerAndy Green <andy@warmcat.com>2021-10-16 05:33:56 +0100
commit55a7c6a0f4ebb7e080b7f0d511d0826094a0863c (patch)
tree0242fb9ac5bf57bd2ea07ca1d03a96a8ca3d1260
parentacb05eb1ca156d2f41366c72274ef12498c01bd8 (diff)
downloadlibwebsockets-55a7c6a0f4ebb7e080b7f0d511d0826094a0863c.tar.gz
http: sse: check POLLIN during DOING_TRANSACTION
When the client goes away, on some platforms all we get is POLLIN revent stuck on... we have to read it to find out a zero length result and understand it's gone. Add SSE mode's DOING_TRANSACTION to the list of states we will read for.
-rw-r--r--lib/roles/h1/ops-h1.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/roles/h1/ops-h1.c b/lib/roles/h1/ops-h1.c
index 1b5ea665..4590a497 100644
--- a/lib/roles/h1/ops-h1.c
+++ b/lib/roles/h1/ops-h1.c
@@ -367,6 +367,7 @@ lws_h1_server_socket_service(struct lws *wsi, struct lws_pollfd *pollfd)
if ((lwsi_state(wsi) == LRS_ESTABLISHED ||
lwsi_state(wsi) == LRS_ISSUING_FILE ||
lwsi_state(wsi) == LRS_HEADERS ||
+ lwsi_state(wsi) == LRS_DOING_TRANSACTION || /* at least, SSE */
lwsi_state(wsi) == LRS_DISCARD_BODY ||
lwsi_state(wsi) == LRS_BODY)) {