Skip to content

Commit f523b4d

Browse files
fix(websocket): consider failure if return value of esp_websocket_client_send_with_exact_opcode less than 0
1 parent 6fda4c1 commit f523b4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/esp_websocket_client/esp_websocket_client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,7 @@ int esp_websocket_client_send_with_opcode(esp_websocket_client_handle_t client,
12281228
goto unlock_and_return;
12291229
}
12301230
ret = esp_websocket_client_send_with_exact_opcode(client, opcode | WS_TRANSPORT_OPCODES_FIN, data, len, timeout);
1231-
if (ret <= 0) {
1231+
if (ret < 0) {
12321232
ESP_LOGE(TAG, "Failed to send the buffer");
12331233
goto unlock_and_return;
12341234
}

0 commit comments

Comments
 (0)