1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

close: add LWSS_WAITING_TO_SEND_CLOSE_NOTIFICATION allowed to send

https://github.com/warmcat/libwebsockets/issues/1159
This commit is contained in:
Andy Green 2018-01-23 07:03:59 +08:00
parent dd9a30b4d2
commit f1b30a39fd

View file

@ -270,9 +270,12 @@ LWS_VISIBLE int lws_write(struct lws *wsi, unsigned char *buf, size_t len,
if (wsi->state != LWSS_ESTABLISHED &&
((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 */