Signed-off-by: Andy Green <andy.green@linaro.org>
did it for you, but that disallowed large, long transfers with multiple
trips around the event loop (and cgi...).
did it for you, but that disallowed large, long transfers with multiple
trips around the event loop (and cgi...).
+6) MAJOR connections on ah waiting list that closed did not get removed from
+the waiting list...
+
lws_free_set_NULL(wsi->rxflow_buffer);
lws_free_set_NULL(wsi->trunc_alloc);
lws_free_set_NULL(wsi->rxflow_buffer);
lws_free_set_NULL(wsi->trunc_alloc);
/* we're closing, losing some rx is OK */
wsi->u.hdr.ah->rxpos = wsi->u.hdr.ah->rxlen;
/* we're closing, losing some rx is OK */
wsi->u.hdr.ah->rxpos = wsi->u.hdr.ah->rxlen;
- lws_header_table_detach(wsi);
- }
+
+ /* we may not have an ah, but may be on the waiting list... */
+ lws_header_table_detach(wsi);
wsi->context->count_wsi_allocated--;
lwsl_debug("%s: %p, remaining wsi %d\n", __func__, wsi,
wsi->context->count_wsi_allocated--;
lwsl_debug("%s: %p, remaining wsi %d\n", __func__, wsi,
pwsi = &pt->ah_wait_list;
if (!ah) { /* remove from wait list if none attached */
pwsi = &pt->ah_wait_list;
if (!ah) { /* remove from wait list if none attached */
-// if (wsi->socket_is_permanently_unusable)
- while (*pwsi) {
- if (*pwsi == wsi) {
- lwsl_info("%s: wsi %p, remv wait\n",
- __func__, wsi);
- *pwsi = wsi->u.hdr.ah_wait_list;
- wsi->u.hdr.ah_wait_list = NULL;
- pt->ah_wait_list_length--;
- goto bail;
- }
- pwsi = &(*pwsi)->u.hdr.ah_wait_list;
+ while (*pwsi) {
+ if (*pwsi == wsi) {
+ lwsl_info("%s: wsi %p, remv wait\n",
+ __func__, wsi);
+ *pwsi = wsi->u.hdr.ah_wait_list;
+ wsi->u.hdr.ah_wait_list = NULL;
+ pt->ah_wait_list_length--;
+ goto bail;
+ pwsi = &(*pwsi)->u.hdr.ah_wait_list;
+ }
+ /* no ah, not on list... no more business here */
goto bail;
}
/* we did have an ah attached */
goto bail;
}
/* we did have an ah attached */