Open kanjiviroja1991 opened 3 months ago
@kanjiviroja1991 thanks for reporting, could you please provide more details on your setup? If possible to add a reproducer as well. esp_websocket_client version information will be useful also.
From the logs shared, it looks like that there was some instability in the network and the client failed to receive, hence the disconnection.
@euripedesrocha , We checked both wifi and ethernet, and we are also keeping an eye on the connection status on our laptop to see if the network is unstable, so there isn't a problem with the internet. However, we found no problem in network connection but ESP32 somehow detect it network issue.
@kanjiviroja1991 I understand that, but I need to understand your scenario how the network is set and versions in use to try to reproduce. Could you also try with log level set to debug for both websocket client and transport and share the logs?
Answers checklist.
IDF version.
v5.2.1
Espressif SoC revision.
ESP32
Operating System used.
Windows
How did you build your project?
Command line with Make
If you are using Windows, please specify command line type.
None
Development Kit.
Custom board
Power Supply used.
USB
What is the expected behavior?
If there is consistent internet service, the websocket connection ought to be reliable and never break. We shouldn't be observe websocket disconnect issue because of tcp driver
What is the actual behavior?
Websocket would regularly disconnect because of a transpot layer issue, even though we were absolutely sure there was no internet connection issue.
Please refer transport layer component from ESP IDF 5.2.1
Steps to reproduce.
==> rlen = esp_transport_read(client->transport, client->rx_buffer, client->buffer_size, client->config->network_timeout_ms); This API frequently thrown ERR_TCP_TRANSPORT_CONNECTION_FAILED error due to we lost our websocket stability on field.
Debug Logs.
More Information.
esp_websocket_client.zip tcp_transport.zip