mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 19:24:33 +02:00
tcp_transport: Fix error propagation on tcp_read()
This commit is contained in:
@@ -291,6 +291,8 @@ static int tcp_read(esp_transport_handle_t t, char *buffer, int len, int timeout
|
|||||||
esp_transport_capture_errno(t, errno);
|
esp_transport_capture_errno(t, errno);
|
||||||
if (errno == EAGAIN) {
|
if (errno == EAGAIN) {
|
||||||
ret = ERR_TCP_TRANSPORT_CONNECTION_TIMEOUT;
|
ret = ERR_TCP_TRANSPORT_CONNECTION_TIMEOUT;
|
||||||
|
} else {
|
||||||
|
ret = ERR_TCP_TRANSPORT_CONNECTION_FAILED;
|
||||||
}
|
}
|
||||||
} else if (ret == 0) {
|
} else if (ret == 0) {
|
||||||
if (poll > 0) {
|
if (poll > 0) {
|
||||||
|
Reference in New Issue
Block a user