diff options
author | Kamil Dudka <kdudka@redhat.com> | 2010-03-19 15:43:11 +0000 |
---|---|---|
committer | Kamil Dudka <kdudka@redhat.com> | 2010-03-19 15:43:11 +0000 |
commit | 19ca0c0fbe3066be78219ac894f0cb0ef7efebb4 (patch) | |
tree | 8a7d017c134448f9951f7133d673fa95c672d561 /lib/sendf.c | |
parent | 6728334edbf7bc858af55c577345a99652fd29de (diff) | |
download | curl-19ca0c0fbe3066be78219ac894f0cb0ef7efebb4.tar.gz |
- Improved Curl_read() to not ignore the error returned from Curl_ssl_recv().
Diffstat (limited to 'lib/sendf.c')
-rw-r--r-- | lib/sendf.c | 6 |
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) |