closing drops any pending ah rx immediately
This commit is contained in:
parent
0a0377b143
commit
846a3caf80
2 changed files with 4 additions and 6 deletions
|
@ -62,10 +62,6 @@ lws_free_wsi(struct lws *wsi)
|
|||
lws_free_set_NULL(wsi->rxflow_buffer);
|
||||
lws_free_set_NULL(wsi->trunc_alloc);
|
||||
|
||||
if (wsi->u.hdr.ah)
|
||||
/* we're closing, losing some rx is OK */
|
||||
wsi->u.hdr.ah->rxpos = wsi->u.hdr.ah->rxlen;
|
||||
|
||||
/* we may not have an ah, but may be on the waiting list... */
|
||||
lws_header_table_detach(wsi, 0);
|
||||
|
||||
|
@ -153,6 +149,10 @@ lws_close_free_wsi(struct lws *wsi, enum lws_close_status reason)
|
|||
|
||||
lws_access_log(wsi);
|
||||
|
||||
if (wsi->u.hdr.ah)
|
||||
/* we're closing, losing some rx is OK */
|
||||
wsi->u.hdr.ah->rxpos = wsi->u.hdr.ah->rxlen;
|
||||
|
||||
context = wsi->context;
|
||||
pt = &context->pt[(int)wsi->tsi];
|
||||
|
||||
|
|
|
@ -1586,8 +1586,6 @@ lws_server_socket_service(struct lws_context *context, struct lws *wsi,
|
|||
wsi->mode != LWSCM_HTTP_SERVING_ACCEPTED &&
|
||||
wsi->mode != LWSCM_HTTP2_SERVING))
|
||||
lws_header_table_detach(wsi, 1);
|
||||
else
|
||||
wsi->more_rx_waiting = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue