We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a6845f4 + 774d1c7 commit aadda22Copy full SHA for aadda22
components/esp_websocket_client/esp_websocket_client.c
@@ -551,9 +551,14 @@ static int esp_websocket_client_send_with_exact_opcode(esp_websocket_client_hand
551
int need_write = len;
552
int wlen = 0, widx = 0;
553
554
+ bool contained_fin = opcode & WS_TRANSPORT_OPCODES_FIN;
555
+
556
while (widx < len || opcode) { // allow for sending "current_opcode" only message with len==0
557
if (need_write > client->buffer_size) {
558
need_write = client->buffer_size;
559
+ opcode = opcode & ~WS_TRANSPORT_OPCODES_FIN;
560
+ } else if (contained_fin) {
561
+ opcode = opcode | WS_TRANSPORT_OPCODES_FIN;
562
}
563
memcpy(client->tx_buffer, data + widx, need_write);
564
// send with ws specific way and specific opcode
0 commit comments