Comments (2)
Thank you for the report. Yes, this is a bug, but since we return number of bytes rather than esp_err_t
type (ESP_OK
vs ESP_FAIL
):
esp-protocols/components/esp_websocket_client/include/esp_websocket_client.h
Lines 190 to 192 in 1ffc20c
I'd suggest adding
ret = widx;
Or better yet, remove those incorrect types and conversions and return ESP_FAIL;
's :
and simply return -1;
on invalid params/etc, and return widx;
on happy flow.
from esp-protocols.
Hi @david-cermak, thanks for the reply.
Or better yet, remove those incorrect types and conversions and return ESP_FAIL;'s :
Good point. BTW returning ESP_FAIL
is exactly what I proposed for this particular line indeed. widx
is already returned on happy flow as it is. I was just not sure if the transport layer could return 0 (in stead of an error) in this case. If not, the whole condition for this case could simply be trimmed.
from esp-protocols.
Related Issues (20)
- console_cmd_ifconfig: not supporting the ppp netif and will panic (IDFGH-11607) HOT 2
- modem_console get_module_name does not call the SHINY function (IDFGH-11628) HOT 1
- Timeout for setting PDP (AT+CGDCONT) in esp-modem is probably wrong? (IDFGH-11638) HOT 4
- Question about Data Mode vs. AT Mode (IDFGH-11668) HOT 1
- websocket not able to receive all the chunk of the data and getting parts when receiving (IDFGH-11691) HOT 1
- Build fails if ETH is enabled, but removed from predefined netifs (IDFGH-11692) HOT 1
- websocket client decided to send first a FIN then a continuation, which is not allowed?! (IDFGH-11736) HOT 5
- When ECHO is deactivated and try to send random AT command AT+CSQ for example using dce->at(). at() returns OK but the response is corrupted. (IDFGH-11753) HOT 1
- Define a subdomain using mDNS (IDFGH-11757) HOT 4
- problems migrating ESP-Modem from 2020-version to 1.0.5 (IDFGH-11815) HOT 9
- Feature Request: Full Response from ESP32 AT SIM Commands (IDFGH-11834)
- ESP_MODEM_MODE_COMMAND fires IP_EVENT_PPP_LOST_IP only after 120 seconds (IDFGH-11871) HOT 4
- OTA fails due to many "HW FIFO Overflows" (IDFGH-11892) HOT 2
- set APN after esp_modem_new_dev() is called? (IDFGH-11898) HOT 2
- Broken link (IDFGH-11903) HOT 1
- How should modem disconnects/reconnects be handled in unstable connections? (IDFGH-11995) HOT 7
- Integrate UART_WAKEUP as part of the esp modem (IDFGH-12062) HOT 7
- Compatibility of Simple CMUX Client Library with CAVLI C16QS Modem (IDFGH-12078) HOT 19
- IPV6 for PDP Context (IDFGH-12084) HOT 2
- FTP client to send and receive files (PACMAN-797) (IDFGH-12110) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp-protocols.