mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00
closing drops any pending ah rx immediately
This commit is contained in:
parent
65135f2bc4
commit
6e8f360e58
3 changed files with 5 additions and 7 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... */
|
||||
lwsl_info("ah det due to close\n");
|
||||
lws_header_table_detach(wsi, 0);
|
||||
|
@ -154,6 +150,10 @@ lws_close_free_wsi(struct lws *wsi, enum lws_close_status reason)
|
|||
}
|
||||
#endif
|
||||
|
||||
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];
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@ lws_plat_service_tsi(struct lws_context *context, int timeout_ms, int tsi)
|
|||
/* still somebody left who wants forced service? */
|
||||
if (!lws_service_adjust_timeout(context, 1, pt->tid)) {
|
||||
/* yes... come back again later */
|
||||
lwsl_debug("%s: done again\n", __func__);
|
||||
//lwsl_debug("%s: done again\n", __func__);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1798,8 +1798,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