return -1 even if SSL_pending() doesn't return non-zero, as we don't really

care how many bytes that is readable NOW. Philippe Raoult reported the
bug in 7.10.3-pre3.
This commit is contained in:
Daniel Stenberg 2002-12-29 16:27:31 +00:00
parent 5a2ab686a6
commit 9b4f92130f

View File

@ -347,10 +347,8 @@ int Curl_read(struct connectdata *conn,
break;
case SSL_ERROR_WANT_READ:
case SSL_ERROR_WANT_WRITE:
/* if there's data pending, then we re-invoke SSL_read() */
if(SSL_pending(conn->ssl.handle))
return -1; /* basicly EWOULDBLOCK */
break;
/* there's data pending, re-invoke SSL_read() */
return -1; /* basicly EWOULDBLOCK */
default:
failf(conn->data, "SSL read error: %d", err);
return CURLE_RECV_ERROR;