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

sspc: client: if not writing, make sure not to write

This commit is contained in:
Andy Green 2020-08-10 14:38:41 +01:00
parent 793ba842fa
commit 8669f6bf61

View file

@ -240,7 +240,7 @@ callback_sspc_client(struct lws *wsi, enum lws_callback_reasons reason,
case LPCSCLI_LOCAL_CONNECTED:
lwsl_notice("%s: LPCSCLI_LOCAL_CONNECTED\n", __func__);
// lwsl_notice("%s: LPCSCLI_LOCAL_CONNECTED\n", __func__);
/*
* Do we need to prioritize sending any metadata
@ -338,8 +338,10 @@ callback_sspc_client(struct lws *wsi, enum lws_callback_reasons reason,
flags = 0;
n = h->ssi.tx(m, h->ord++, pkt + LWS_PRE + 19, &len,
&flags);
if (n == LWSSSSRET_TX_DONT_SEND)
if (n == LWSSSSRET_TX_DONT_SEND) {
n = 0;
break;
}
h->txc.tx_cr -= len;