examples/socket: Fix for send() failure handling.

Closes https://github.com/espressif/esp-idf/issues/9475
This commit is contained in:
Abhik Roy 2022-09-08 16:11:14 +05:30
parent 27ec200ded
commit b3c39d2324

View File

@ -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;
}