aboutsummaryrefslogtreecommitdiff
path: root/lib/sendf.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sendf.c')
-rw-r--r--lib/sendf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/sendf.c b/lib/sendf.c
index 0d6764cbf..79ffce7a4 100644
--- a/lib/sendf.c
+++ b/lib/sendf.c
@@ -538,9 +538,11 @@ int Curl_read(struct connectdata *conn, /* connection data */
if(conn->ssl[num].state == ssl_connection_complete) {
nread = Curl_ssl_recv(conn, num, buffertofill, bytesfromsocket);
- if(nread == -1) {
+ if(nread == -1)
return -1; /* -1 from Curl_ssl_recv() means EWOULDBLOCK */
- }
+ else if(nread == -2)
+ /* -2 from Curl_ssl_recv() means a true error, not EWOULDBLOCK */
+ return CURLE_RECV_ERROR;
}
else if(Curl_ssh_enabled(conn, (PROT_SCP|PROT_SFTP))) {
if(conn->protocol & PROT_SCP)