mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
sse: server: handle close found as HUP
This commit is contained in:
parent
a0bfc98edf
commit
b156268521
1 changed files with 5 additions and 0 deletions
|
@ -632,6 +632,11 @@ rops_handle_POLLIN_h1(struct lws_context_per_thread *pt, struct lws *wsi,
|
|||
|
||||
lwsl_debug("%s: %s: wsistate 0x%x\n", __func__, lws_wsi_tag(wsi),
|
||||
(unsigned int)wsi->wsistate);
|
||||
|
||||
if (pollfd->revents & LWS_POLLHUP &&
|
||||
!lws_buflist_total_len(&wsi->buflist))
|
||||
return LWS_HPI_RET_PLEASE_CLOSE_ME;
|
||||
|
||||
n = lws_h1_server_socket_service(wsi, pollfd);
|
||||
if (n != LWS_HPI_RET_HANDLED)
|
||||
return n;
|
||||
|
|
Loading…
Add table
Reference in a new issue