1) MAJOR connections on ah waiting list that closed did not get removed from
the waiting list...
+2) MAJOR since we added the ability to hold an ah across http keepalive
+transactions where more headers had already arrived, we broke the ability
+to tell if more headers had arrived. Result was if the browser didn't
+close the keepalive, we retained ah for the lifetime of the keepalive,
+using up the pool.
+
v1.7.2
======
"wsi->more_rx_waiting %d\n", __func__, wsi,
(int)(now - wsi->u.hdr.ah->assigned),
ah->rxpos, ah->rxlen, wsi->mode, wsi->state,
- wsi->u.hdr.more_rx_waiting);
+ wsi->more_rx_waiting);
}
/* if we think we're detaching one, there should be one in use */
char post_literal_equal;
unsigned char parser_state; /* enum lws_token_indexes */
char redirects;
- char more_rx_waiting;
};
struct _lws_websocket_related {
unsigned int user_space_externally_allocated:1;
unsigned int socket_is_permanently_unusable:1;
unsigned int rxflow_change_to:2;
+ unsigned int more_rx_waiting:1; /* has to live here since ah may stick to end */
#ifndef LWS_NO_EXTENSIONS
unsigned int extension_data_pending:1;
#endif
assert(wsi->u.hdr.ah);
while (len--) {
- wsi->u.hdr.more_rx_waiting = !!len;
+ wsi->more_rx_waiting = !!len;
assert(wsi->mode == LWSCM_HTTP_SERVING);
if (wsi->u.hdr.parser_state != WSI_PARSING_COMPLETE)
continue;
- lwsl_parser("lws_parse sees parsing complete\n");
+ lwsl_parser("%s: lws_parse sees parsing complete\n", __func__);
+ lwsl_debug("%s: wsi->more_rx_waiting=%d\n", __func__,
+ wsi->more_rx_waiting);
wsi->mode = LWSCM_PRE_WS_SERVING_ACCEPT;
lws_set_timeout(wsi, NO_PENDING_TIMEOUT, 0);
* reset the existing header table and keep it.
*/
if (wsi->u.hdr.ah) {
- if (!wsi->u.hdr.more_rx_waiting) {
+ lwsl_info("%s: wsi->more_rx_waiting=%d\n", __func__,
+ wsi->more_rx_waiting);
+
+ if (!wsi->more_rx_waiting) {
wsi->u.hdr.ah->rxpos = wsi->u.hdr.ah->rxlen;
lws_header_table_detach(wsi);
} else