circuitpython/ports/espressif/common-hal/wifi
Jeff Epler 66411fdd38
espressif: check return value from esp_ping_new_session
esp_ping_new_session can fail, particularly if ping is called quickly
many times in succession.

This is because `esp_ping_new_session` has to do a bunch of stuff
including creating a task and a socket. Calling `esp_ping_delete_session`
doesn't clean up these resources immediately. Instead, it signals the
task to clean up resources and exit 'soon', but 'soon' is defined as 1
second.

When the calls are frequent, the in-use sockets and tasks fill up
available slots—I didn't actually check which resource gets used
up first.

With this change, the ping call will raise an exception instead of
continuing with a call to esp_ping_start that crashes.

Closes #5980 based on my testing on an ESP32S3-N8R2.
2023-05-05 17:11:03 -05:00
..
__init__.c update esp-idf; allow start/stop channels in wifi scanning 2022-10-07 15:29:09 -04:00
__init__.h Adding manual IP address set 2022-05-27 15:33:54 -05:00
Monitor.c fix wifi reset and monitor deinit routine 2021-11-10 23:38:44 +05:30
Monitor.h update wifi monitor 2021-11-04 16:21:18 +05:30
Network.c fix AuthMode printing regression 2022-12-15 15:49:58 -05:00
Network.h rename left over esp32s2 to espressif 2021-09-18 19:42:18 +05:30
Radio.c espressif: check return value from esp_ping_new_session 2023-05-05 17:11:03 -05:00
Radio.h rearrange hostname 2021-11-02 12:33:11 +05:30
ScannedNetworks.c update esp-idf; allow start/stop channels in wifi scanning 2022-10-07 15:29:09 -04:00
ScannedNetworks.h update esp-idf; allow start/stop channels in wifi scanning 2022-10-07 15:29:09 -04:00