You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As ENOMEM is always returned when the device is disconnected, it adds a lot of delay if we process like that.
(And if we don't process like that, the throughput isn't respected and we can't send all our data in time...).
What's is your advice to detect properly a disconnection ?
In
esp-idf 4.2
(https://github.com/espressif/esp-idf/tree/v4.2), I have some troubles when I send data to a wifi client in UDP: espressif/esp-idf#6852If the client is disconnected,
sendto
always (or almost) returnENOMEM
.In
esp-idf 4.2
, the version ofesp32-wifi-lib
is: https://github.com/espressif/esp32-wifi-lib/tree/8075af8. I found that theENOMEM
is the error returned byesp_wifi_internal_tx_by_ref
(ESP_ERR_NO_MEM
).ESP_ERR_NO_MEM
when a client is disconnected ?I understand that, even in UDP, as the physical layer is Wi-Fi, an ACK is required (https://en.wikipedia.org/wiki/Distributed_coordination_function). So why return a
no memory error
and not just a timeout or another error like that ?sendto
returnENOMEM
. Like in your example: https://github.com/espressif/esp-idf/blob/v4.2/examples/wifi/iperf/components/iperf/iperf.c#L290 .As
ENOMEM
is always returned when the device is disconnected, it adds a lot of delay if we process like that.(And if we don't process like that, the throughput isn't respected and we can't send all our data in time...).
My example code is available in the esp-idf ticket: espressif/esp-idf#6852
The text was updated successfully, but these errors were encountered: