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

ws: wsi unusability only applies when no pending

We basically hear about HUP out-of-band with respect to
pending rx... now we mark the wsi as "unusable" once we
see the HUP - the connection has ended.

This means we have to differentiate between the wsi
being unusable for new things now, like replying, and
what it has already sent still being servicible and
pending.
This commit is contained in:
Andy Green 2021-03-19 20:29:22 +00:00
parent 50e1f1ed13
commit f576f317aa
2 changed files with 0 additions and 11 deletions

View file

@ -57,14 +57,6 @@ int lws_ws_client_rx_sm(struct lws *wsi, unsigned char c)
}
#endif
/*
* Peer may have closed, but that doesn't necessarily mean we should not
* parse any rx we have from them.
*
if (wsi->socket_is_permanently_unusable)
return -1;
*/
switch (wsi->lws_rx_parse_state) {
case LWS_RXPS_NEW:
/* control frames (PING) may interrupt checkable sequences */

View file

@ -50,9 +50,6 @@ lws_ws_rx_sm(struct lws *wsi, char already_processed, unsigned char c)
pmdrx.eb_out.token = NULL;
pmdrx.eb_out.len = 0;
if (wsi->socket_is_permanently_unusable)
return -1;
switch (wsi->lws_rx_parse_state) {
case LWS_RXPS_NEW:
#if !defined(LWS_WITHOUT_EXTENSIONS)