Commit 9b4f9213 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

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.
parent 5a2ab686
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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))
        /* there's data pending, re-invoke SSL_read() */
        return -1; /* basicly EWOULDBLOCK */
        break;
      default:
        failf(conn->data, "SSL read error: %d", err);
        return CURLE_RECV_ERROR;