mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
examples/socket: Fix for send() failure handling.
Closes https://github.com/espressif/esp-idf/issues/9475
This commit is contained in:
parent
27ec200ded
commit
b3c39d2324
@ -53,6 +53,8 @@ static void do_retransmit(const int sock)
|
||||
int written = send(sock, rx_buffer + (len - to_write), to_write, 0);
|
||||
if (written < 0) {
|
||||
ESP_LOGE(TAG, "Error occurred during sending: errno %d", errno);
|
||||
// Failed to retransmit, giving up
|
||||
return;
|
||||
}
|
||||
to_write -= written;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user