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

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.
This commit is contained in:
Andy Green 2021-10-16 05:28:37 +01:00
parent acb05eb1ca
commit 55a7c6a0f4

View file

@ -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)) {