diff --git a/lib/output.c b/lib/output.c index 5885c66f..983e4860 100644 --- a/lib/output.c +++ b/lib/output.c @@ -278,9 +278,12 @@ LWS_VISIBLE int lws_write(struct lws *wsi, unsigned char *buf, size_t len, if (!lws_state_is_ws(wsi->state) && ((wsi->state != LWSS_RETURNED_CLOSE_ALREADY && + wsi->state != LWSS_WAITING_TO_SEND_CLOSE_NOTIFICATION && wsi->state != LWSS_AWAITING_CLOSE_ACK) || - wp != LWS_WRITE_CLOSE)) + wp != LWS_WRITE_CLOSE)) { + lwsl_debug("binning\n"); return 0; + } /* if we are continuing a frame that already had its header done */ diff --git a/lib/service.c b/lib/service.c index 9cfb0eba..288f568b 100644 --- a/lib/service.c +++ b/lib/service.c @@ -1591,9 +1591,6 @@ read: break; } - /* all the union members start with hdr, so even in ws mode - * we can deal with the ah via u.hdr - */ if (wsi->ah) { lwsl_info("%s: %p: inherited ah rx\n", __func__, wsi); eff_buf.token_len = wsi->ah->rxlen -