https://github.com/warmcat/libwebsockets/issues/496
Even if no ah available, we will be on the ah waiting list and get triggered
when one is freed and we're next in line.
Signed-off-by: Andy Green <andy@warmcat.com>
}
}
+ if (!lws_header_table_attach(new_wsi, 0))
+ lwsl_debug("Attached ah immediately\n");
+
return new_wsi;
fail:
* readbuf data to wsi or ah yet, and we will do it next if we get
* the ah.
*/
- if (!lws_header_table_attach(wsi, 0)) {
+ if (wsi->u.hdr.ah || !lws_header_table_attach(wsi, 0)) {
ah = wsi->u.hdr.ah;
memcpy(ah->rx, readbuf, len);
ah->rxpos = 0;