Skip to content
Snippets Groups Projects
Commit 45ac5a85 authored by Damien George's avatar Damien George
Browse files

extmod/modlwip: Workaround esp8266 sendto issue where 1 is returned.

parent a6354238
No related branches found
No related tags found
No related merge requests found
...@@ -379,7 +379,10 @@ STATIC mp_uint_t lwip_udp_send(lwip_socket_obj_t *socket, const byte *buf, mp_ui ...@@ -379,7 +379,10 @@ STATIC mp_uint_t lwip_udp_send(lwip_socket_obj_t *socket, const byte *buf, mp_ui
pbuf_free(p); pbuf_free(p);
if (err != ERR_OK) { // udp_sendto can return 1 on occasion for ESP8266 port. It's not known why
// but it seems that the send actually goes through without error in this case.
// So we treat such cases as a success until further investigation.
if (err != ERR_OK && err != 1) {
*_errno = error_lookup_table[-err]; *_errno = error_lookup_table[-err];
return -1; return -1;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment