aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/sendf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sendf.c b/lib/sendf.c
index b73c22438..d04371f84 100644
--- a/lib/sendf.c
+++ b/lib/sendf.c
@@ -301,6 +301,7 @@ ssize_t Curl_send_plain(struct connectdata *conn, int num,
} else {
failf(conn->data, "Send failure: %s",
Curl_strerror(conn, err));
+ conn->data->state.os_errno = err;
*code = CURLE_SEND_ERROR;
}
}
@@ -355,6 +356,7 @@ ssize_t Curl_recv_plain(struct connectdata *conn, int num, char *buf,
} else {
failf(conn->data, "Recv failure: %s",
Curl_strerror(conn, err));
+ conn->data->state.os_errno = err;
*code = CURLE_RECV_ERROR;
}
}